Table height: as long as needed.

Hi guys,

I’m using a simple Table.
If it contains 5 elements, I’d like the table to be just long enough to contain these 5 elements with no “empty table area” at the bottom
If it contains 100 elements, I’d like it’s height to be long enough to show the 100 elements with no scrollbar on the table element (but probably a scroll bar for the whole page).

Like if I was doing an html table in fact.

Is there an easy way to do that?

Thanks.
John.

Yes, just say table.

setPageLength(0); 
table.setHeight(null);

Table has null height and page length of 15 by default

Thank you man, it works!


table.setPageLength(0);
table.setHeight(null);