dhtmlxGrid exception about destructor

Dear,



I use dhtmlxGrid V1.5 pro in IE7. My sample code is:



var grid = new dhtmlXGridObject(“gridDiv”);

grid.setImagePath("…/dhtmlxgrid/imgs/");

grid.setSkin(“light”);

grid.setDateFormat("%Y.%m.%d");

grid.enableColumnAutoSize(true);

grid.enableColSpan(true);

grid.enableRowspan(true);

grid.enableColumnMove(true);

grid.enableMultiselect(true);



//Do load data in grid and do some my own processing.



grid.destructor();

$(“gridDiv”).innerHTML="";



but here comes the problem. an exception is throwned out in dhtmlxgrid.js at the line in init():



if (_isIE) window.setTimeout(function(){ self.setSizes(); },1);



where I observed that self.setSizes=null.



Would you like to give me some advice to fix the problem?



Best Regards,



Ren Hongmin

Would you like to give me some advice to fix the problem?
The problem may occur only if you are destructing grid exactly after initializing it - which is quite strange use-case.
If you not need to support IE 5.5 you can safely comment problematic string ( it is not necessary for later versions of IE )


Dear,

     Following your advice,the problem was solved.

     By the way, the strang use-case is mainly used to automaitcally  generate the grid and import it into World.

    Thanks very much.