Hi,
Quite late answer, but I found it when googling around.
A solution I found to this problem was the following:
1) Count rows in the table
2) Defin a variable that is equal to the amount of rows multiplied with the height of one row (and add 1 extra pixel, to avoid the scroll bar)
3) Added an "if" total height > YOUR MAX HEIGHT then the height changes to your set max height.
var HeightOfTable = (data.getNumberOfRows()+1.5) * 20 + 1
if (HeightOfTable > 601) {
HeightOfTable = 601
}
I added 1.5 to my rows to compensate for the header row.
Yay, first post :)