I have created a DataGridView in a forms based application.
I have preselected some some rows based on some conditions using the following code:
DataGridView1.Rows[i].Selected = true;
now I have a button which allows the user to move the focus(record pointer) to the next selected row.
When the user clicks the button I do the following
DataGridView1.CurrentCell = DataGridView1[0,row_number];
but when this happens the previously selected row loses the highlight.
I want to maintain the highlight (selection) of the previous row also but the record pointer should be moved to the next selected row. How can I acheive this.