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
It's here:
dataGridView1.SelectedRows[selectedRowCount]
If you have 3 selected rows then selectedRowCount = 3 and there are three rows with indexes: 0, 1, 2.
You are trying to access #3 which doesn't exist.