Grid or Table - Multi-line header

Hello!
Where can I see some examples of the construction Multi-line header using Grid or Table, look like in attach ?

18901.png

Only Grid supports multi-line headers. However, you can only join cells horizontally, not vertically like in your example. Nevertheless, you can probably accomplish that with some header cell styling, by styling the borders of the cells in the different header rows, etc.

Joining header cells is described
in the book
. There’s one example
here
and another
there
.

Thanks, Marko!

When you want only a new line in the the header cell, than you can use “

table.setColumnHeader(property, "Zeile1</br>Zeile2");

Thanks! It has been useful for me :slight_smile:

Hello,
I need to put mulirow content in the Grid header. No problem, I use :

liste.getDefaultHeaderRow().getCell(refColumn).setHtml(“line1” + “
” + “line2”);

It works fine BUT no way to tell to the header to fit the content by adapting its height.
I tried to put a CSS rule “height: auto” everywhere, 2 problems :

  • the height of the header row fits the content but the header overflows the first row of my grid
  • the header deco doesn’t adapt

Is there a ticket about it ? Is there a good way to implement it ?

Thanks.

Patricia Dechandol:
Hello,
I need to put mulirow content in the Grid header. No problem, I use :

liste.getDefaultHeaderRow().getCell(refColumn).setHtml(“line1” + “
” + “line2”);

It works fine BUT no way to tell to the header to fit the content by adapting its height.
I tried to put a CSS rule “height: auto” everywhere, 2 problems :

  • the height of the header row fits the content but the header overflows the first row of my grid
  • the header deco doesn’t adapt

Is there a ticket about it ? Is there a good way to implement it ?

Thanks.

I have same problem. What can i do?