Destructor / Clear All error - Grid Refresh

I have a grid set up with events attached to the onEditCell, onBeforeRowDeleted and onBeforeSelect events



(Here’s the javascript syntax)



mygrid.attachEvent(“onEditCell”,doOnCellEdit);

mygrid.attachEvent(“onBeforeRowDeleted”,doBeforeRowDeleted);

mygrid.attachEvent(“onBeforeSelect”,doBeforeSelect);







I would like the page this is on to call any XML and plug the XML into the grid without forcing a reload of the whole page. I’ve tried 3 methods to reload the grid with a new XML (the XML also includes the header information so the init of the grid is simply



First, I tried a clearAll(true) and loadXML(). When that failed, I tried destroying the grid (mygrid.destructor();), I got the following error:



line: 23

Char: 433

Error: Object doesn’t support this property or method

Code: 0

URL: grid.htm



Line 23 is the first line of my doOnCellEdit function and it doesn’t have 433 characters, So I thought it might be something in the codebase.



So I tried detaching the events (mygrid.detachEvent(“onEditCell”,doOnCellEdit); …)



line: 550

Char: 192

Error: ‘this[…]’ is null or is not an object

Code: 0

URL: grid.htm



There’s not even 550 lines in grid.htm so I figured it was something inside of the core that was not allowing the destruction of the grid with events tied to it (due to the error when actually executing the detach event function).



Am I doing something wrong here???

if you need to reload only data
grid.clearAll(); //without parameter
grid.load(new_data);
dhtmlx.com/docs/products/dhtmlxG … 6313278000

>>I tried destroying the grid (mygrid.destructor();), I got the following error:
After destructor usage, grid’s object is not accessible anymore, you need to created new instance

>>So I tried detaching the events (mygrid.detachEvent(“onEditCell”,doOnCellEdit); …)
detachEvent works as
var event_id = mygrid.attachEvent(“onEditCell”,doOnCellEdit);

mygrid.detachEvent(event_id);
( but it is not necessary for data reloading )