Announcement

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

    List Grid with Sticky Header

    My requirement is that i want page scroll, not the grid scroll. When page scroll reaches at certain position than ListGrid header is also scrolled up .
    What I need is that , when page scroll comes at listGrid Header position then listGrid Header should become fixed, just like Sticky Header in JQuery.

    Can you please suggest how to achieve this in Smart GWT?

    #2
    Page scrolling plus a sticky header makes sense as a design for a content-oriented website like a magazine, but is a terrible choice for an application, which is why you don't see it used. Imagine, for example, than in Excel, the whole "page" scrolled, such that you would have to scroll back up to the top of your data to get to most of the controls.

    Furthermore, the ListGrid is (correctly) designed around having its own scrolling region, separate from the page, and the only way to get the whole page to scroll to ListGrid content would be to make the grid as tall as all of its rows, which would break both incremental rendering and incremental data loading.

    The only way to realistically achieve page scrolling and incremental data loading (without writing your own page-scrolling-oriented version of ListGrid, a monumental task), would be to turn off browser-level scrolling, use a full-screen SmartGWT Canvas with overflow:"auto" so that you have full-screen scrolling that is not actual browser scrolling, and then handle scroll events so that sometimes you allow the whole-screen Canvas to scroll, and sometimes you instead scroll whatever ListGrid has come into view.

    This would be fiendishly complicated and produce a much worse UE, so we very, very strongly recommend against pursuing it.

    Comment

    Working...
    X