i am trying to get selected row index but i got error
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
MessageBox.Show(dataGridView1.SelectedRows[0].Index.ToString());
}
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
whats wrong
Selected row index
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Sep 8, 2013, 8:07 AM EDT