Announcement

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

    SmartGWT: ListGrid should grow only as per the number of records

    I am using ListGrid in SmartGWT.
    I don't want to set height of grid in advance as I dont know the number of records in the DataSource.

    So, the requirement is:
    If there are less than 10 records, grid's height would be in proportion with the number and if number of records are greater than 10, I will use pagination.

    #2
    When you initially draw the grid you clearly *have* to know its height. The widget can't decide how high it should be without being told.

    This means you need to know the height value before you attempt to draw the widget. Which means you need to change your design so this vital piece of information is available at the point you want to draw the widget.

    Comment


      #3
      Actually, this is supported, example is here.

      If you combine this grid with some other widget in a layout, it will take as much space as it needs for the rows, scrolling if there are more than 10.

      Comment


        #4
        Originally posted by Isomorphic View Post
        Actually, this is supported, example is here.

        If you combine this grid with some other widget in a layout, it will take as much space as it needs for the rows, scrolling if there are more than 10.
        I happily stand corrected. That's well worth knowing about. :)

        Comment


          #5
          Originally posted by Isomorphic View Post
          Actually, this is supported, example is here.

          If you combine this grid with some other widget in a layout, it will take as much space as it needs for the rows, scrolling if there are more than 10.
          Thanks for the help!

          And I am assuming by above statement, that after 10 records, pagination will come into picture, right?

          Comment

          Working...
          X