Page 1 of 1

FindChildren with Infragistics-WinGrid

Posted: Mon Apr 28, 2008 10:13 am
by Schuco
It's no problem to retrieve the rows:
Element[] rows = parent.FindChildren(Role.Row);

My problem is when the Grid is filtered, I always get all rows and the rows only differ in their state ( Invisible ), for 4000 rows FindChildren runs at least 15 minutes, is there a workaround for retrieving only visible rows?

Posted: Mon Apr 28, 2008 10:44 am
by Support Team
You can set the Element.IgnoreInvisible property to true. That way, invisible elements will be ignored in the FindChild(ren) methods.

Regards,
Alex
Ranorex Support Team

Posted: Mon Apr 28, 2008 10:59 am
by Schuco
Support Team wrote:You can set the Element.IgnoreInvisible property to true. That way, invisible elements will be ignored in the FindChild(ren) methods.

Regards,
Alex
Ranorex Support Team
That does not work faster.

Posted: Mon Apr 28, 2008 1:06 pm
by Support Team
If Element.IgnoreInvisible is set, the FindChildren method should skip all invisible rows. That should enhance the search performance.
Could you please check if the state of the invisible row elements is indeed State.Invisible?

Code: Select all

bool isInvisible = (row.State & State.Invisible) != 0;
Alex
Ranorex Support Team

Posted: Mon Apr 28, 2008 1:39 pm
by Schuco
Support Team wrote:If Element.IgnoreInvisible is set, the FindChildren method should skip all invisible rows. That should enhance the search performance.
Could you please check if the state of the invisible row elements is indeed State.Invisible?

Code: Select all

bool isInvisible = (row.State & State.Invisible) != 0;
Alex
Ranorex Support Team
I tried it with a for-loop, only the invisible rows have state:Invisible
If I step through the children with a for-loop, the higher the count ( up to 3970 ) the worse the performance !! Even when I loop through them backwards !!

Posted: Tue Apr 29, 2008 4:26 pm
by Support Team
In fact, the FindChildren did not react to the Element.IgnoreInvisible property. We've fixed that bug in the current Ranorex version (1.4.0.5) available at:
http://www.ranorex.com/download.html

Regards,
Alex
Ranorex Support Team