How do I add a node as a child to another node using client side scripting? I see there are add methods that can be used on the treeview, but they seem to add the nodes to the root.
Thanks
Hi sseelam,
You can add a node as a child to another node like this:
myNode.getItems().add(newNode)
Hope this helps.
Regards,
Lyuba Petrova
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi,
you can also add a node at a specific level of the tree by calling:
myNode.getItems().add(node, "0.0");
0 is the first root node and the second 0 is the first child of the first root node. So your node will be added to:
A (0)
B (0.0)
C (0.0.0) <- added here
Thanks,
Lubomir