in the documentation it says
setHeader(hdrStr,splitSign,styles)
set header label and default params for new headers
styles - array of header styles
in my code:
var headerStyles=new Array(“gridheader1,gridheader2”);
…
testgrid.setHeader(“header1,header2”,"#cspan",headerStyles);
in my css file:
.gridheader1 {background-color: red;}
but it doesn’t work. (header bg is not red.)
any suggestions?
Command expect actual css code, not the class name
var headerStyles=[“background-color: red;”,“background-color: green;”];
…
testgrid.setHeader(“header1,header2”,"#cspan",headerStyles);
is there any method to set class name for headers?
There is no such API method, but after grid.init , when HTML structure already created you can set id directly through DOM
grid.hdr.rows[1].cell[3].className=“my_css_class”;
not cell[i] but cells[i] worked, thanks.