# Hide column in table

vinhvo
369 3

I have a table with many columns . Therefore the labels of each column was partially hidden. Is there anyway to auto change line in column table ?

Thank you.

delete retag edit

## 4 Replies

jimmyshiau
4921 5
http://www.zkoss.org/

Hi vinhvo
Could you post your sample code ?

vinhvo
369 3

<grid mold="paging" pageSize="10" id="myGrid" fixedLayout="true" >
<columns sizable="true">
<column label="Column name"></column>
....
</columns>
<rows></rows>
</grid>

I have many columns , there fore the header/label of the column was partially hidden. Is there anyway to auto break line of the column's hear automatically ?

jimmyshiau
4921 5
http://www.zkoss.org/

Only label component has multiline attribute
you have to use label

<grid>
<columns sizable="true">
<column><label  multiline="true" onCreate='self.value="aa\nbb"'/></column>
<column label="Content"/>
</columns>
</grid>



vinhvo
369 3

Thank you. But the label texts I read from database and they change all the time. However, The grid seems to hide labels randomly. I thought It might be hard to achieve, so I use tooltip if the user wants to know what the text is.
But your post were very useful in other case.

[hide preview]