Check documentation for the latest version 6.0 of dhtmlxSuite insertColumn DHTMLX Docs

insertColumn

adds a new column to the grid

void insertColumn(number ind,string header,string type,number width,string sort,string align,string valign,any reserved,string columnColor);

Parameters

indnumberindex of the column
headerstringheader content of column (optional, blank by default)
typestringthe type of the column (optional, 'ed' by default)
widthnumberthe width of the column (optional, '100' by default)
sortstringthe sort type of the column (optional, 'na' by default)
alignstringthe align of the column (optional, 'left' by default)
valignstringvertical align of column (optional)
reservedanynot used for now
columnColorstringbackground color of the column (optional)

Available only in PRO Edition

Example

//minimal parameters set
myGrid.insertColumn(10); 
//maximal parameters set
myGrid.insertColumn(11,'Some text','ed',120,'na','left','top',null,'red');

Details

The method can be used after grid is initialized. At least one column should be in the grid

Back to top