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

Jean PaulRank #32 · 38.5K reputationPosted Nov 4, 2011, 12:31 AM EDT
dataGridView1.SelectedRows[0].IsNewRow
or
dataGridView1.SelectedRows[0].DataBoundItem == null
Suthish NairRank #92 · 22.8K reputationPosted Nov 6, 2011, 4:55 AM EST
Yadlapalli SrikanthRank #7,940 · 231 reputationPosted Nov 6, 2011, 7:32 PM EST
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