Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42441

VS 2010 How to go to a specific row on a datagridview

$
0
0
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

Viewing all articles
Browse latest Browse all 42441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>