Column group solution


Does someone implement column group in Vaadin? I have an UI requirement as attached (see header part). I wonder whether there is any experience in this forum.



I seem to be the bearer of bad news this morning! No, this is not currently possible with core Vaadin.

I’ve done a quick search, and I couldn’t see an enhancement ticket for this fairly standard request :
feel free to add one.

In the interim, it might be possible to build a component to place above the table that looks like the table header and listens to column resizing : i.e. it may be possible to build your own. Tricky, though - and I suspect the “real” implementation would be quite tricky too, so I wouldn’t expect it to be implemented any time soon.




There’s the
fake headers
solution, although that requires fixed widths for the columns, which is a bit limiting.

You can also make multiline table-headers by having HTML in the column headers, and then do some CSS trickery to make them look as if there was column groups. See
this post
. I’m not quite sure about the details how it was done there. You may have to overflow content from one cell to another. Or, make fake division within a single column to make it look like it’s two columns.