Alex,
frmGridData is the form name. The grid on teh form is DGV_Names. Do you mean
DGV_Names.FirstDisplayedSc
Thanks, ADawn
Main Topics
Browse All TopicsI have Datagridview on a form (frmGridData). A user double-clicks on a record in the grid to open another form (frmGridDataDetails) to make changes to the data. After the record has been edited, the user clicks save. The form (frmGridDataDetails) closes and the grid refreshs on the frmGridData form to show the data change in the grid. How do I get the grid to show (or select) the record (row) that was just edited. I've been reading about currenymanager, however, I have no idea how to use it.
ADawn
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
OK I tried your code, however, I need it to select a row by it unique number (autoid) of the record. I have records added to a sql database with an auto increment field (AutoID). I need to be able to (select or highlight) the record (row) within the datagridview after the record has been updated (edited).
The column is AutoID
Thanks, ADawn
Hello alex,
I'm sorry for the late reply - been on vacation. I'm not understanding what you're doing. Let me explain better. Say I do a search for books that start with the word 'Green' . I click a button and 228 items are shown in the datagridview. Now, I double-click on a row (autoId = 578) to open that record for editing in another form. Once the editing has been completed, the edit form is closed and the grid on the orginal form is refreshed. Now, I want to set the focus back on the record with the autoid of 578. How can I do that?
Thanks for your help and patience. - ADawn
in that case propably the easiest thing to do is to iterate through the AutoID cells and if you find your desired row to select and display do so.
this is just an example, of course you will need to replace 578 with the integer variable holding the last edited AutoID and the "AutoID" is the columnname, which might be different in your case.
cheers
Alex
Business Accounts
Answer for Membership
by: CyberLexPosted on 2009-05-01 at 08:33:21ID: 24280438
Greetings
ScrollingR owIndex = integer
maybe you are looking for this?
frmGridData.FirstDisplayed
this will make the gridview scroll to the rowindex, but only if its not already in view
cheers
Alex