tree based lookup

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 two things:

  • How to use create a tree in a form (tutorial_Form_TreeControl will help you).
  • How to use a modeled form as a lookup form. Note that it depends on where you’re using the lookup (e.g. if it’s in SysOperation framework dialog), therefore if you’re struggling with this part, you should tell us more about your goal.

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.

Thanks Martin,

I have requirement in which I want to add lookup (for Item Id )in form and that lookup field will show the Item In tree format.

So there is two header in tree ,Item and services and related item will show in next level of tree.