CellTable Grouping

883 views
Skip to first unread message

Jeff Larsen

unread,
Apr 5, 2011, 1:31:04 PM4/5/11
to google-we...@googlegroups.com
Has anyone done any work to make celltable groupable? I'm currently working on modifying CellTable (or better said copy/pasting celltable into a new class in the same package structure and modifiying the renderRowValues). This feels wrong, but I can't figure out a clean way to add groups to the table anyother way. Has anyone else run into this and solved it? 

Thanks,
Jeff

Raphaël Brugier

unread,
Apr 6, 2011, 9:53:05 AM4/6/11
to google-we...@googlegroups.com
By grouping you mean set a rowspan ?

You can set the rowspan of cell using the cellTable api :

    public void setRowSpan(final int row, final int column, final int rowSpan) {
        cellTable.getRowElement(row).getCells().getItem(column).setRowSpan(rowSpan);
    }

Jeff Larsen

unread,
Apr 6, 2011, 9:59:29 AM4/6/11
to google-we...@googlegroups.com
I need to add rows to the table and dynamically change the headers based on which rows are being grouped. For example, if I had a table of books and grouped by Authors, I would want to add a row with colspan set to the entire table columand remove the Authors column from the grid. Removing the column is sorta easy, I still need to be sorting on that column,  but adding the additional row is part that I haven't figured out (without copy/pasting CellTable and maiming it to my own specifications). 

2011/4/6 Raphaël Brugier <raphael...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Reply all
Reply to author
Forward
0 new messages