DHTMLX Docs & Samples Explorer

setHeader(hdrStr, splitSign, styles)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxgrid.js

set header label and default params for new headers

  • hdrStr - header string with delimiters
  • splitSign - string used as a split marker, optional. Default is ”#cspan”
  • styles - array of header styles
   //setting columns labels
   mygrid.setHeader("A,B,C");
   //setting columns labels and it's styles
   mygrid.setHeader("A,B,C",null,["text-align:right;","text-align:left;","text-align:center"]);

See also: setNoHeader, attachHeader, setColumnLabel