This project is read-only.

Can't get a large Datagrid

Jun 18, 2009 at 3:57 PM
Edited Jun 18, 2009 at 4:02 PM

I can't seem to get control of a large datagrid.  My datagrid has over 2000 rows, and UISpy nor, project white will allow me to get individual items (row data) in the datagrid (or even a row count).  If I reduce the number of rows in the datagrid (Ex. 125 rows) then I can get control of it and use it without problems. 

So is there a limit to the size of the datagrid?  Is this an UIAutomation problem?  Is there any work around I can do for this?

Code example:

            searchCriteria = SearchCriteria.ByAutomationId("grdEmployees");
            var employeeGrid = AppEnvironment.window.Get<ListView>(searchCriteria);
            rows = employeeGrid.Rows;
            Console.WriteLine("the number of rows: " + rows.Count);

When the datagrid has 125 rows, I get the proper row count.  But if it has 263 rows (as an example; I don't know the exact number of rows that it starts to fail) I get zero as the row count.
- Dazed and confused


Jun 18, 2009 at 5:01 PM

I forgot to mention my applicaiton is a Silverlight application.  This might be the problem because I have a different application that is a WPF app, and it has the exact same list and I can the objects in there no problem.

Do you think it's just a Silverlight issue?

Jun 25, 2009 at 4:21 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.