Announcement

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

    Keep ListGrid's selected row vertically centered

    Hi,

    Is it possible to add top and bottom margin to ListGrid's Body so that it would be possible for us to keep a specific row in the grid always centered in ListGrid's "viewport"? We have a case where the user will go through a number of rows in the grid and has to act on each row. For the UI to be good, it would be preferred to keep the current row in the same position so that the user does not have to click around the grid.

    We almost have this functionality in place by calling "scrollToRow(row, "center", alwaysScroll == true)" in ListGrid which works nicely when working with the rows in between. The problem arises when working with the rows at the start and at the end of the grid. As the grid does not have any empty space at the top (nor in the bottom), the scroll logic obviously cannot keep the scroll position centered.

    Do you have any suggestions on the preferred method on how to achieve this with ListGrid?

    Much appreciated,
    Marko

    #2
    We would advise against trying to do this, on user experience grounds; it's just odd to be able to scroll into empty space at the beginning of the grid. If you are trying to keep the active row centered in order to show adjacent data, then it makes sense that at the top of the grid the active row is at the top - that maximizes how many adjacent rows are visible.

    That all said, if you really really to do this, the least hacky way is probably to add an extra row at the top of the grid, and keep it blank.

    Comment

    Working...
    X