Results 1 to 4 of 4

Thread: Position a particular row at the top of the grid

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,230

    Position a particular row at the top of the grid

    Hi,

    I have a custom grid where the users can jump to a row using grid.goto(n).
    However, the position of the row is not always consistent. I would like to force that row to the top of the viewable portion of the grid.

    How can I accomplish that?

    Thanks

    Herb

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,966
    Hi Herb,

    In the next build (5.4.1) I've added an additional argument to the goto() method which will position the row.


    0 Scroll to ensure that the item is visible.
    1 Scroll to position the item at the top of the viewport.
    2 Scroll to position the item at the bottom of the viewport.
    3 Scroll to position the item at the center of the viewport.

    Alternatively call doScroll() and use above values + 10 e.g.

    doScroll(11)

    That will position the current row at the top of the viewport.
    Last edited by barrymavin; 2020-10-18 at 01:44.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,230
    Hi Barry.

    That is so useful!

    Thanks!

    Herb

  4. #4
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,010
    Excellent!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us