How to get the rows count from datagrid???

  • Thread starter Thread starter Jet Leung
  • Start date Start date
As I recall, DataGridName.Items.Count should return this - but be sure to do
it after it's been bound to its datasource, or you'll be counting an empty
grid.

HTH,

Paul
 
Jet,

The data source for the DataGrid is always going to implement IList.
Get the data source, cast it to IList, and then use the Count property to
determine how many items are in the grid.

Hope this helps.
 
Back
Top