This code
CurrentSelectedRow = Me.dgvPreviouslyCut.CurrentRow.Index
stores the current selected row that has been clicked by the user in a data grid view control . After refreshing the datasource for the data grid view, this code
Me.dgvPreviouslyCut.Rows(CurrentSelectedRow).Selected = True
programmatically re-selects the same row.
Immediately afterwards though
Me.dgvPreviouslyCut.CurrentRow.Index
is always set to zero, NOT the variable CurrentSelectedRow as you would expect.
Why does programmatically setting the select row index not cause the property CurrentRow.Index to be set to the same?