| View previous topic :: View next topic |
| Author |
Message |
Schuco
Joined: 21 Feb 2008 Posts: 9 Location: Ternitz
|
Posted: Mon Apr 28, 2008 11:13 am Post subject: FindChildren with Infragistics-WinGrid |
|
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 ... |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 200
|
Posted: Mon Apr 28, 2008 11:44 am Post subject: |
|
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 |
|
| Back to top |
|
 |
Schuco
Joined: 21 Feb 2008 Posts: 9 Location: Ternitz
|
Posted: Mon Apr 28, 2008 11:59 am Post subject: |
|
| 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 ... |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 200
|
Posted: Mon Apr 28, 2008 2:06 pm Post subject: |
|
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: click into code to enlarge
bool isInvisible = (row.State & State.Invisible) != 0;
Alex
Ranorex Support Team |
|
| Back to top |
|
 |
Schuco
Joined: 21 Feb 2008 Posts: 9 Location: Ternitz
|
Posted: Mon Apr 28, 2008 2:39 pm Post subject: |
|
| 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: click into code to enlarge
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 ... |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 200
|
Posted: Tue Apr 29, 2008 5:26 pm Post subject: |
|
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 |
|
| Back to top |
|
 |
|