CellTable - hide/show individual columns?

158 views
Skip to first unread message

Magnus

unread,
Oct 17, 2012, 7:35:56 AM10/17/12
to google-we...@googlegroups.com
Hi,

I would like to let my users hide some columns of a CellTable, but they should also be able to show them again.

Is there a built-in functionality for this? Is there example code somewhere?

Thanks
Magnus

Thomas Broyer

unread,
Oct 17, 2012, 11:32:07 AM10/17/12
to google-we...@googlegroups.com
Either use CSS (addColumnStyleName/removeColumnStyleName)  or simply remove/add the columns themselves (removeColumn, addColumn, insertColumn)

Magnus

unread,
Oct 18, 2012, 7:56:48 AM10/18/12
to google-we...@googlegroups.com
Hi Thomas,

ok, but if the user should be able to do this one would have to implement such a functionality?

For example, there could be a small dropdown list somewhere at the table header which allows to mark all columns that schould be shown...

Magnus

Jens

unread,
Oct 18, 2012, 8:11:21 AM10/18/12
to google-we...@googlegroups.com
 
ok, but if the user should be able to do this one would have to implement such a functionality?

Yes. 

James

unread,
Oct 18, 2012, 9:48:03 AM10/18/12
to google-we...@googlegroups.com
I can use removeColumnStyleName to hide one column and addColumnStyleName to restore that column. I run into one issue. Once one column is hiding, each row of the result table has a large height (almost double).

James
Reply all
Reply to author
Forward
0 new messages