开发者

How do I control column width of the Vaadin Table?

I have a large table to display in one of our Vaadin application. The table has 110 columns with large text header for each column.

On display the table looks awful as all the column header goes off the screen and the header separator loses the alignment with the data record column separator.

I have set the table width to 100% to display the table scrollbar. I tried to set columnExpandRatio as well as column width but no success开发者_StackOverflow.

Vaadin table by default sets the text header width as the column width. Is there any way i can set the header/column width to fit my data rather the header?


Finally as a solution I assigned no width value to initial columns (like first 30 columns will span naturally) and later columns with fixed width size with setColumnWidth() and it worked.


Please use table column name hide which s very useful for the viewer can choose what are the column he is able to view ...

http://demo.vaadin.com/sampler/#TableRowHeaders

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜