How to get fixed header height for dhtmlxgrid


#1

Hi,

I have a grid with resizable column headers. My problem is when i reduce the size of a column header , the height of the header changes according to the text in the header. I dont want this to happen. I want the header to have fixed height. pls help.


#2

You can set css to the necessary grid’s header in the setHeader()/attachHeader() method
https://docs.dhtmlx.com/api__dhtmlxgrid_setheader.html
https://docs.dhtmlx.com/api__dhtmlxgrid_attachheader.html

myGrid.setHeader("Long header with nowrap,Another long header",'',['white-space:nowrap; overflow:hidden;','']);
myGrid.attachHeader("Long header with nowrap,Another long header",['white-space:nowrap; overflow:hidden;',''])

Here you can find an example:
http://snippet.dhtmlx.com/eb63daf19