tags:

views:

553

answers:

1

When loading the data from the database and then displaying to the datagridview, the record pointer will point to the first row of the datagridview.

Is it possible to maintain the record pointer to the current selected row in a datagridview after refreshing the records?

A: 

I would preserve the DataGridView.CurrentCellAddress (I forget the type) before refreshing the DataGridView. After refreshing, check that the Cell at that address is still valid. Then, set the DataGridView.CurrentCell to the Cell at that address.

JJO