Announcement

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

    grid: Autofit number of rows to available space

    Hi,

    Is there a way to let a grid work out the number of setAutoFitMaxRecords() itself? Setting this ourselves is just a 'magic number' and doesn't look good on every browser size/desktop resolution etc.

    So this example:
    http://www.smartclient.com/smartgwt/showcase/#grid_autofit_new_records

    If you would place the "Edit New" button above the grid, and add new rows, then the grid should grow till the bottom of the showcase window, and only then start to scroll when adding new rows.

    Is this doable?

    #2
    We don't really see the point - either there's nothing below the ListGrid + button layout, in which case you could just set that Layout to fill available space and not use autoFitting, or there *is* something else below the ListGrid+button, in which case you would not want the ListGrid to fill the space or you'd push it out of view.

    Comment


      #3
      It's when the grid is taking up all space, but doesn't contain that many rows, it's too ugly. If the grid doesn't contain a lot of rows and the grid isn't that big, UX ideas say that this is a more relaxed view for users.


      If there is something underneath it, it would be indeed great to only push x number of rows down before scrolling in the grid, and not cause scrolling outside the layout.

      Comment

      Working...
      X