How to bind Hierarchical Data

2 posts, 0 answers
  1. Vivek
    Vivek avatar
    1 posts
    Member since:
    Dec 2011

    Posted 29 Dec 2011 Link to this post

    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.


      
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 29 Dec 2011 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top