How to make the Parent Id of all the tree element 0 by defau

How to make the Parent Id of all the tree element 0 by default i.e right after loading the grid . Right now i’m getting a NULL value when i try to display the parent id of the selected item at the beginning ie when the tree data type has no Child . To be more specific " When i create a grid after loadXML command i click on the column corresponding to the tree datatype. I issue a Right Click handler which displays the parent Id of the same (in this case NULL) using an alert message. But when i do mygrid.moveRowTo(mygrid.getSelectedId(),mygrid.getParentId(mygrid.getSelectedId()),“move”,“sibling”); command inorder to make the child a parent im getting the parent id of the Moved element as 0. this cuses problem in further steps during my Sort operation.

Kindly help me out

The current version of dhtmlxTreeGrid has not such entitiy as super root items, any value which equal to js logical null (null,"",0)  can be threated as super root item id. For now there is no way to force more strict behavior.

Oncoming version 1.4 will have more strict hierarchy and provide|recognize only ID==0, if necessary - please contact at, I can send you the betta version code ( release planed on next week, so it is pretty stable )