How can I force a row into view?

3 posts, 1 answers
  1. Dave Galligher
    Dave Galligher avatar
    37 posts
    Member since:
    May 2010

    Posted 08 Jun 2011 Link to this post

    I've got a grid with 53 rows, the real estate on the screen only allows 12 to be viewed, a process runs that finds the desired value in row 37; gridView.CurrentRow property is set to the row in question, but it selects well below what is displayed to the user. How can I force the row into view?  When I scroll down manually the proper row is selected, I'm trying to avoid making the user scroll to see the row selected.

    Thank you in advance.
  2. Answer
    Dave Galligher
    Dave Galligher avatar
    37 posts
    Member since:
    May 2010

    Posted 08 Jun 2011 Link to this post

    Never mind... found it: TableElement.ScrollTo(rowIndex, columnIndex) makes it work.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 09 Jun 2011 Link to this post

    Hi Dave,

    I usually use the

    GridViewRowInfo.EnsureVisible()

    function on the row I need to display.

    Regards
    Erwin
Back to Top