开发者

GWT Celltable resize

I'm developing an application using GWT. I'm using celltable to display dynamic values from database (based on a query). I have following queries:

Assume: I have set the table height as 100px. I have placed the table in a scrollpanel.

  1. Now, My query returns 20rows, which are more than 100px, I want the table to resize to fit all the 20rows. which inturn would cause the scrollpanel to resize, which inturn should resize the parent of the scrollpanel. First of all, I would like to know if this is possible at all? If so, how?

I have tried these: I thought, by obtaining the tables new and old height, I could resize by calling setHeight() and for the parent's height, by getParent().setHeight(). However, I was stupid to think this way as开发者_开发百科 I'm setting the value of the height for the table to be 100px. As this is static, it would print the same value for old and new height and would change nothing.

Any ideas of how to proceed with this??

P.S: I'm using GWT2.3


You're sure that you're not setting a fixed size for the celltable containers?

The containers will shrink, expand with the celltable, but they also need to not have their height set (the height defaults to auto - which is the behavior that you need).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜