A
Alex Feinman [MVP]
The datasource property must implement IList or IListSource in order for it
to be possible to use with DataGrid. This means that you could
do the following:
IList iLst = grid.DataSource as IList;
if ( iLst == null ) // does not implement IList
{
IListSource ls = grid.DataSource as IListSource;
if ( ls != null )
iLst = ls.GetList();
}
if ( iLst != null )
count = iLSt.Count;
to be possible to use with DataGrid. This means that you could
do the following:
IList iLst = grid.DataSource as IList;
if ( iLst == null ) // does not implement IList
{
IListSource ls = grid.DataSource as IListSource;
if ( ls != null )
iLst = ls.GetList();
}
if ( iLst != null )
count = iLSt.Count;