Data Grid Problem...

pad

Member
Joined
Jan 18, 2005
Messages
14
Programming Experience
5-10
Hi...
How to get the Total No. of rows and columns avail in the datagrid...?

Probably my data grid filled with nearly 100 rows and 15 columns. But i don't know the exact no. Data grid fill the values from database. So i would like to get the total no. of rows and cols in the data grid

Need quick reply.

Tx in advance
 
If all the rows and columns aren't visible, that won't give you the total number.
I would look at the dataSource and use the Count property of the dataTable.Rows and DataTable.Columns properties.
 
If he doesn't know how many columns he has then he I doubt he's using table styles or has hidden anything. Pad did also say he wanted the row's columns in the DataGrid, Maybe he doesn't want to count hidden coulumns....
 
Back
Top