datatable header in two lines

Hello.

I have a datatable header text which I want to write in two lines.
I have set also headerRowHeight:40. And
I tried this:

header:{text:‘Extra-<\br/>cost’,css:{‘line-height’: ‘17px !important’,‘padding-top’:‘10px !important’}}

But is there an easier way to manage this?

Thank you and have a great and healthy time.

Michael

Hello @Michael,

But is there an easier way to manage this?
Unfortunately there is no easier way to do this.

As an alternative solution, you can add extra logic to calculate the automatic height for the header:
https://snippet.webix.com/s756hso4
The bottom line is that a temporary HTML element is created with the desired css and innerHTML, the height or width is taken from it, and then this element is removed from DOM.

Okay and thanks for your answer.