I want to add a lookup in a form and it will show the lookup in a tree format...how to start for it ....
You need to know to things:
I checked that example and only I understand how to add parent root and element 2 and element 3 .But how the child is added
It's simple. You create a tree item and then add it to a particular parent by addItem(), where you provide parent's ID:
tree.addItem(parentIdx, 0, formTreeItem);
If you have problem with a particular piece of code in tutorial_Form_TreeControl, please share the code with us and tell us which part you don't understand.