Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid scrollToRow()

    The scrollToRow(int rowNum) position the row so that it appears near the center of the viewport.
    What if I want to position the row so that it appears at the top of the viewport ?
    I'm playing around with the ListGrid's scrollBodyTo(x,y), but I can't seem to calculate the y correctly.
    Can somebody give me a hint how to do this ?

    #2
    ListGrid scrollToRow

    I used the following and was able to get it to work:

    ListGrid lg = new ListGrid();

    int cellHeight = lg.getCellHeight();
    lg.scrollBodyTo(null, ((rownum) * cellHeight));

    Comment

    Working...
    X