deleteColumn in dhtmlxgrid when multi line headers exist fai

There appears to be a bug in dhtmlxgrid (version 1.6 enterprise). If I have a grid with a 2 line header. I call setHeader and then attachHeader, a call to insertColumn then throws an error in the javascript.



To reproduce the error, take the sample file pro_grid_cols.html from the htmlxgrid samples (in rows_columns_manipulation dir) and add the following line



mygrid.attachHeader("#rspan,Blue,#cspan,#rspan,#rspan,#rspan,#rspan,#rspan");



either before or after the mygrid.init().



When you then try to delete a column (in my case it was one of the columns I have added using the add column button above), an error occurs in the javascript.



A similar problem to do with addColumn was fixed recently.


Issue confirmed and fixed.
Fixed js file sent by email.