if (dgvClient.SelectedRows.Count > 0)
{
DataGridViewRow currentRow = dgvClient.SelectedRows[0];
if (currentRow.Cells.ToString() != String.Empty)
{
//The code that will be here will open a form
}
else
{
MessageBox.Show("Select a non null row");
}
}
However, it doesn't appear to be working, and I'm out of ideas :/
Thanks for any help,
Ari
However, it doesn't appear to be working, and I'm out of ideas :/
Thanks for any help,
Ari
Yadlapalli SrikanthPosted Nov 7, 2011, 12:32 AM
rowdatabound event u chk the data when you are binding if the data is not present assign text as no data found your problem will be solved.
use style sheet for user interface to show effectively for that databound
Suthish NairPosted Nov 6, 2011, 9:55 AM
Jean PaulPosted Nov 4, 2011, 4:31 AM
dataGridView1.SelectedRows[0].IsNewRow
or
dataGridView1.SelectedRows[0].DataBoundItem == null