TREE: Is ite possible to insert a node b/w two nodes

TREE: Is it possible to insert a node b/w two nodes?

You can use insertNewNext method

how to insert node in the first position i.e. before all the childs of a parent node?

for example: I have 3 child nodes occupying index positions 0,1,2 .I want to insert a new child at index position 0


You can use moveItem method to move item to the first position:


tree.insertNewNext(top_item_id,new_item_id,text);


tree.moveItem(new_item_id,“up_strict”);

thanks for the reply…

i have used

tree.insertNewChild(parent_item_id,new_item_id,text);



tree.moveItem(new_item_id,“up_strict”);


it didnot worked


Try to use tree.insertNewNext(top_item_id,new_item_id,text); instead of tree.insertNewChild(parent_item_id,new_item_id,text);

its working with insertNewNext(…)
thanks