Java Kumara
Java Kumara

Reputation: 97

How to create a complex header in vaadin 7?

I was using setColumnHeader(Object, String) to set a simple string as a column header. I want to create a complex header. I would like to know if there is any way to build a similar table as shown in the below figure in Vaadin 7. https://i.sstatic.net/u5dIw.gif

Upvotes: 4

Views: 1000

Answers (2)

jsosnowski
jsosnowski

Reputation: 1590

Now it is possible using Grid:

enter image description here

// Group headers by joining the cells
HeaderRow groupingHeader = grid.prependHeaderRow();
HeaderCell namesCell = groupingHeader.join(
    groupingHeader.getCell("firstname"),
    groupingHeader.getCell("lastname"));
HeaderCell yearsCell = groupingHeader.join(
    groupingHeader.getCell("born"),
    groupingHeader.getCell("died"),
    groupingHeader.getCell("lived"));

This example is taken from Vaadin Book. Just to show that new Vaadin 7.5 (and above) can build table with complex header (joined columns). Another good resource is in Vaadin Wiki.

As you notice such grouping is also possible for footer row.

Upvotes: 3

André Schild
André Schild

Reputation: 4774

Not at the moment.

It is scheduled for vaadin 7.4, which is currently in alpha stage.

Upvotes: 3

Related Questions