dg.Rows[e.RowIndex].Selected = true;
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
private void gv_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { //Your code } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)