After added a new record I want to refresh my datagridview and then focus on the newly added record. At the moment it resets itself to the top of the grid. Also if I edit a record and this could be somewhere in the middle of the grid I want to refresh and and then focus on that record.
For adding a record I have tried:
Dim i As Integer
i = datagridview1.Rows.Count - 1
datagridview.CurrentRow.Selected = i
For adding a record I have tried:
Dim i As Integer
i = datagridview1.Rows.Count - 1
datagridview.CurrentRow.Selected = i