I've tried the following, but to no avail.
if (dgvClient.SelectedRows.Count == 1)
{
selected = true;
}
Thanks.
Thanks.
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.
TulasiPosted Nov 7, 2011, 2:02 AM
foreach (DataGridViewRow r in dataGridView1.Rows)
Jean PaulPosted Nov 7, 2011, 1:34 AM
selected = dataGridView1.Rows[0].Selected
else for checking any of the rows are selected
selected = (dataGridView1.SelectedRows.Count > 0);