Hi There,
Here is the scenario (using version 3.0 pro) :
- Setup Table and Enable Smart Rendering
- Refresh the grid (the grid works as expected)
- Add a column
- Refresh the grid (the grid works as expected)
- Delete the column
- Refresh the grid (the grid works as expected)
- Add the column again
- Refresh the grid (the grid breaks with the below error message)
‘_attrs.style’ is null or not an object
/codebase/dhtmlxgrid.js line 149
(or line 5111 when using /sources/dhtmlxgrid.js)
It seems that the column may not be getting fully deleted or added somehow.
Here is the code I am using to create the grid:
Grid.setImagePath("/DHTMLX/dhtmlxgrid/samples/common/images/");
Grid.setEditable(false);
Grid.enableSmartRendering(true,50);
Grid.setHeader("1,2,3,4,5,6,7");
Grid.setInitWidths("100,50,50,50,70,30,120");
Grid.setColAlign("left,left,left,left,left,left,left")
Grid.setColTypes("ed,ed,ed,ed,ed,ed,ed");
Grid.setColSorting("str,str,str,str,str,str,str");
Grid.init();
And here is the code I am using to refresh it as needed
while(Grid.getColumnsNum() > 7){
Grid.deleteColumn(Grid.getColumnsNum()-1);
}
Grid.insertColumn(7,'EXTprelimReviewStatus','ed',120,'na','left','top',null,'red');
Grid.clearAll();
Grid.loadXML("XMLgrid_Changes.php");
Any help would be greatly appreciated.
Thanks!