how to count datagridview rows in csharp?
hi everyone, i need help to count the datagrid rows, in csharp.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 29, 2011, 9:09 AM
Priya LingePosted Aug 29, 2011, 7:28 AM
You can get datagrid rows count by following way,
int rowcount = ((DataTable)datagrid1.DataSource).Rows.Count;
MessageBox.Show(rowcount.ToString());
Hope this will help you.
Thanks.
Black DiamondPosted Aug 29, 2011, 9:21 AM