I am wanting to use insertColumn() to add a column to the grid. However, I have 2 header rows that need text in them. The insertColumn() only shows how to add text to the first header row. How can I get custom text in to the 2nd header row on a new column?
I am trying to populate the newly created column 2nd row header with a custom counter. The newly created column index is stored in the variable colIndex. I’ve tried:
mygrid.setColLabel(colIndex, "{#custom_sum}", 2);
Firebug returns this error:
g is undefined dhtmlxgrid.js (line 69)
I also tried using accessing through the DOM with:
mygrid.hdr.rows[2].cells[colIndex].innerHTML = "{#custom_sum}";
Firebug returns this error:
mygrid4.hdr.rows[2].cells[colIndex] is undefined
Any suggestions on what I am doing wrong or should I be approaching this problem another way?
I was able to find my error, I was passing the column id, not the column index.