DHTMLXTree: locked tree?

When executing a full expand of the tree (opens all items dynamically), I get an exception “‘that.G_node.id’ is null or not an object” whenever I expand some other node in the meantime… I guess this behaviour is normal when messing with the tree’s internal state variables (the queue of nodes used while opening the nodes dynamically), but how can I avoid it?



PS. I implemented the onAllOpenDynamic myself, by doing the following in dhtmlxtree_xw:



dhtmlXTreeObject.prototype.openAllItemsDynamic = function(itemId)

{

    //alert(“can see you”);

    this.ClosedElem=new Array();

this.G_node=null;

var itemNode = this._globalIdStorageFind(itemId||this.rootId);

this.onLoadReserve = this.onXLE;

this.onXLE=this._loadAndOpen;

if(this._getOpenState(itemNode)<0)this._HideShow(itemNode,2);

if(itemNode.XMLload==0)this.ClosedElem.push(itemNode);

//this.setOnLoadingEnd(this._loadAndOpen);

this._openAllNodeChilds(itemNode,0);

if(this.ClosedElem.length>0)this._loadAndOpen(this);

};





Thanks

Please contact us directly at support@dhtmlx.com, we will send you latest version of dhtmlxgrid_xw.js which must not cause such issue.