in vaadin hilla grouping column header is working fine whereas joining column under one header not working. vaadin 14 had option for joining 2 columns which is lacking in hilla. if anyone has any solution for this?
private static Grid<String> createGrid() {
Grid<String> grid = new Grid<>();
grid.setId("grid1");
grid.addThemeVariants(GridVariant.LUMO_COLUMN_BORDERS);
grid.appendHeaderRow();
List<Grid.Column<String>> columns = addColumns(grid);
HeaderRow.HeaderCell header = grid.prependHeaderRow()
.join(columns.get(0), columns.get(1));
header.setText("first + second");
grid.prependHeaderRow()
.join(columns.toArray(new Grid.Column[columns.size()]))
.setText("joined");
grid.setItems("1", "2", "3");
return grid;
There is no direct support for joining table body cells in
vaadin-grid
, it was not even in Vaadin 14 version. There is just option to join header cells.If you want to show complex data in body cell, e.g. join data from multiple properties, you need to use renderer
Use it in
vaadin-grid
And define rendered function