Heinz
January 20, 2019, 1:32pm
1
Hello,
I have a grid that has several columns with long text in column header, for example "Ist Artikelnr Korrektur"
Is there a way so that I can wrap the headertext and have multiple lines in a column header in a grid?
So for example 2 lines:
Ist Artikelnr
Korrektur
This can be done by appending the following CSS to the client\src\styles.css file:
.ui-datatable-thead th .ui-column-title {
white-space: normal;
height: 2rem;
}
2 Likes
Hi ,
I want to do this also but not for all the pages in the application but only on one specific page and grid on that page .
enchev
April 13, 2020, 1:36pm
4
You can use the approach from this thread:
Set custom attribute named "class" to your headerless grid with some value:
[Снимок экрана 2020-04-11 в 09.54.03]
Put in style.css:
[Снимок экрана 2020-04-11 в 09.50.16]
Done
[Снимок экрана 2020-04-11 в 09.52.32]
This works if there are no nested tables.
In theory, the record:
.my-headerless-grid:first-child .ui-datatable-thead {
display: none;
}
should work only for the parent table, but for some reason all the headers of the child tables are also hidden. I'm working on it.
2 Likes