I have a C# winforms application and I am trying to get a button working that will select the next row in a datagridview after the one curently selected.
The code I
First, set "Multiselect" property of datagridview to false.
int currentRow = dataGridView1.SelectedRows[0].Index; if (currentRow < dataGridView1.RowCount) { dataGridView1.Rows[++currentRow].Selected = true; }
It will select the next row in the datagridview.