This is a migrated thread and some comments may be shown as answers.

How to bind Hierarchical Data

1 Answer 87 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 1
Vivek asked on 29 Dec 2011, 01:42 PM
Hello
 How can we bind parent-child relationship in Treeview recursively remember this could be for n-tier for e.g

Company
Division-1
           Sub-Division-11
           Sub-Division-12
           Sub-Division-13
Division-2
           Sub-Division-21 
           Sub-Division-22
           Sub-Division-23  

In my database i have Node ID and Parent Node ID also i want to do drag and drop inside this tree.


  

1 Answer, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 29 Dec 2011, 03:52 PM
Hi,
There are basically two ways to initialize a hierarchical template - with HierarchicalDataTemplates or with DataTemplates and a TemaplateSelector. You can read more here and here and I've also attached a sample project which shows both approaches so you could examine it and see what works best for you.
If you have more questions feel free to ask.

Greetings,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TreeView
Asked by
Vivek
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Share this question
or