FindChildren with Infragistics-WinGrid

Class library usage, coding and language questions.
Schuco
Posts: 9
Joined: Thu Feb 21, 2008 4:16 pm
Location: Ternitz

FindChildren with Infragistics-WinGrid

Post by Schuco » Mon Apr 28, 2008 10:13 am

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?
Everybody here ... comes from somewhere ...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Apr 28, 2008 10:44 am

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

Schuco
Posts: 9
Joined: Thu Feb 21, 2008 4:16 pm
Location: Ternitz

Post by Schuco » Mon Apr 28, 2008 10:59 am

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.
Everybody here ... comes from somewhere ...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Apr 28, 2008 1:06 pm

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

Schuco
Posts: 9
Joined: Thu Feb 21, 2008 4:16 pm
Location: Ternitz

Post by Schuco » Mon Apr 28, 2008 1:39 pm

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 !!
Everybody here ... comes from somewhere ...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Tue Apr 29, 2008 4:26 pm

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