Hi Guys,
I have a UnitTest that requires me to check the properties of the XCeedGrid following some simple coding.
I create a List<T>, where T is a very simple public class called ‘DummyEntity’ that has a property of ‘BoundId’ on it of type string. The list has 3 instances of the DummyEntity within it.
I have set the Grid’s ‘AutoCreateColumns’ to ‘true’ and then set the DataSource property on the Grid:
grid.DataSource = list;
However, the grid returns ‘0’ from the following code:
grid.DataRows.Count
I do not understand this as I have 3 valid objects in my list that I have set on the Grid’s ‘DataSource’. Using ‘SetDataBinding’ instead makes no difference. I’m wondering if the Grid knows that it has not been required to paint (as it is created within a UnitTest) which has resulted in 0 rows being created. Or I am being stupid and need to set another property on the Grid, maybe?
Can you please suggest what I should do or check?
Thanks!
Regards,
Russell
Imported from legacy forums. Posted by russellcoombes (had 1876 views)