Deleting Node Elements in DHTMLX Tree


I am using DHTMLX Tree professional Edition1.6. I am having a problem in deletion of node elements. I am getting a script error like this

SCRIPT ERROR: ‘this.allTree.childNodes.0’ is null or not an object

Below is how i am constructing a tree


            aMenu2=new dhtmlXContextMenuObject(‘120’,0,"<%=request.getContextPath()%>/images/treespec/imgs/");





            var tree2=new dhtmlXTreeObject(“usertree”,“100%”,“100%”,2);













The tree is constructed with 10000 records. My tree element deletion function is as follows

DELETION FUNCTION:tree2.deleteItem(destinationid1,true);

In the above function a variable ‘destinationid1’ holds the value of the selected item in tree2 to be deleted.

Can you please suggest me solution for this problem.

Awaiting for your reply,


With regards,


The mentioned error may occur only in case, when super-root item was deleted from tree.
The super root item ID defined by 4th parameter of constructor, and has “0” as ID by default, please be sure that you have not used same ID for some other elements in tree and not called delete operation against it.

There were some fixes in SRND extension for dhtmlxtree ( none of them directly related to mentioned issue ) - so, if problem still occurs for you - please contact us directly at - we will send you latest codebase.