Announcement

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

    ListGrid expand to natural height

    How can I get a ListGrid expand to its natural height?

    I have try
    this.setAutoHeight();
    this.setOverflow(Overflow.VISIBLE);

    As well tried to add listener for when data is received to then dynamically getHeight() of list but can't find the right method to return total height.

    Any ideas? ...basically this ListGrid is to appear inside an getExpansionComponent of another ListGrid, so I need grid to expand to it's natural dynamic height once data is received.

    Please help. Thanks

    #2
    Maybe if someone can help me determine how to get the height of the rows in the ListGrid, I can then setHeight of the listGrid. So far I've been unsuccessful in figuring it out.

    Comment


      #3
      Okay figured it out!

      Got the behavior I wanted by applying the following
      listGrid.setDefaultHeight(10);
      listGrid.setAutoFitData(Autofit.VERTICAL);

      Note that a default height of 0 or 1 did not work and canvas did not auto size.
      Default Height is 100 so if there is only 1 row canvas would be too big; this is reason I change the default height and want it to auto fit.

      Comment

      Working...
      X