I’m trying to work with a Datagrid in Silverlight without much success. I’m trying to get the data from it, with the following methods, but nothing seems to work. Can you help me out?
Datagrid (The first row is a Headerrow, the last column is blank. The last column shows up in the UI, but not in the source code for the project or UISPY):
|| Name || Age || Interesting || ||
| Joe User | 25 | False | |
| Suzie Smart | 18 | False | |
| Jon Con | 45 | True | |
Core.UIItems.ListView lv = document.Get<Core.UIItems.ListView>("GridOne");
txtResult.Text = lv.Rows.Cells["Name"].Text;
Fails with an Object not set to an instance of an object error.
ListViewCell b = lv.Rows.Cells["Name"];
Fails on the Assert test as it is NULL
I have tried several other methods with the same results.
Note: I’m able to get the header rows text, count rows, but I can seem to count the columns for any rows either.
Thanks in advance,