dhtmlxGrid header per column CSS Style via setHeader() ;-(

I tried setHeader({comma delimited string of labels}, null, {array of styles per column})…

I placed this before init(); and after init()…

Not working, note that I also have a JSON file that populates the header data… I need that because it defines my columns…

So…

I got frustrated and found my own way…

{dhtmlxGridobject}.grid.hdr.rows[1].cells[{column number}].firstChild.style.textAlign = {textAlign Value};

This is where the labels of the first row (first visible row anyway) are stored… in the grid header row…

EDIT

Actually… I was calling this from a myeXcell custom function… (custom cell type)

myeXcell.grid = myeXcell.cell.parentNode.grid;

So… {dhtmlxGridobject}.grid

is the DHTMLGrid Object, :slight_smile:

Good luck!

setHeader() method builds the main header for the grid. This method cannot be used in case of initialization frim the xml/json.