how to set column headers in datagrid2, to 2 lines at the first space in the header text

0
Hi, how can I set column headers in datagrid2, to 2 lines at the first space in the header text.   So :   - two lines has to become :  - two lines   additionally: - for a specific datagrid2 - for all datagrid2's   thanks 
asked
1 answers
0

For a specific datagrid2, you could set a class like "wrap-headers" on it and then in your scss files:

.wrap-headers .table .th .column-header span {  
    text-wrap: wrap;
}

 

And if you want to align the filters to the bottom:

.wrap-headers .table .th .column-container { 
    justify-content: space-between;
}

 

To target all datagrids, lose the .wrap-headers parts.

I don't think it's possible to target the first space, not with CSS only. But that may not be what you meant anyway. The above will break at the appropriate space and not within words. Also, it will not limit wrapping, so if you have "A very long column header here" it may wrap to three or more lines, depending on the width of the column. 

answered