i have an datagridview .................when i click a button the gridview will appear in a panel....
while am clicking the buton can i check that datagridview is empty or not.can anybody help?
Loading
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.
Ahmed JSPosted Nov 18, 2014, 11:37 AM
int k = dataGridView1.Rows.Count;
if (k<=0)
{
MessageBox.Show("Record does not exist");
}
Michal HabalcikPosted Nov 18, 2014, 9:53 AM
DataGridView1.Rows.Count
DataGridView1.RowCount
Joginder BangerPosted Nov 18, 2014, 7:56 AM
datagridview.row.count();
it's return the int type value.