Restore Selected Item in Grid after refresh of Grid

Posted on 2004-10-21
Last Modified: 2010-04-23
Lets say I have a grid...a user clicks on a ROW and a Modal form pops up...then they make some changes and return to the Grid. What is the quickest way to put the Grid Index pointer on the same row they is the catch, the grid refreshes it's data whenever the modal form closes, and more records may be in the grid then when the user opened the modal form...therefore I cannot simply rely on the ROW NUMBER because the records position may have moved within the grid...I can capture the ID of the record selected...but how do you restore based on this? Do you have to loop through the entire grid to get the new row number and then use...

dgMainGrid.CurrentRowIndex = intRowNumberOfID
Question by:natloz
    1 Comment
    LVL 8

    Accepted Solution

    yes, if that data is totally different you will need to filter through the data to find your specific ID number.

    check this question out


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    I'm currently working for a company where I have to upgrade over 50 VB6 programs to VB.NET 2008.  So far I'm about half way through, and I've learned quite a few tricks that drastically improve the performance of VB.NET apps. Because there are a…
    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now