Hierarchical Data Template Treeview

2 posts, 0 answers
  1. Prasad Saravate
    Prasad Saravate avatar
    2 posts
    Member since:
    Mar 2010

    Posted 11 Mar 2010 Link to this post

    I am haveing trouble  rendering hierarchical data template   I have hierarchical itemsource as follows:
    can you show me how to use tree with hierarchical datatemplate, I won't be knowing number of levels in the tree in advance.

    #region

     

    top

     

     

    var top = new FacetValue()

     

    {

    Id = 1,

    Freq =

    "",

     

    Values =

    new FacetValue[]

     

    {

     

    new FacetValue

     

    {

    Id = 2,

    Freq =

    "",

     

    Values =

    new FacetValue[]

     

    {

     

    new FacetValue

     

    {

    Id = 3,

    Freq =

    "included",

     

    Values =

    new FacetValue[]

     

    {

     

    new FacetValue

     

    {

    Id = 4,

    Freq =

    "",

     

    Values =

    null

     

    },

     

    new FacetValue

     

    {

    Id = 5,

    Freq =

    "",

     

    Values =

    null

     

    }

    }

    }

    }

    },

     

    new FacetValue()

     

    {

    Id = 6,

    Freq =

    "",

     

    Values =

    new FacetValue[] {}

     

    },

     

    new FacetValue()

     

    {

    Id = 7,

    Freq =

    "excluded",

     

    Values =

    null

     

    }

    },

    };

    #endregion

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 12 Mar 2010 Link to this post

    Hi Prasad Saravate,

    I prepared a sample project for you that illustrates how you can use hierarchical data templates for the RadTreeView.

    I included a couple of RadTreeView controls in the example and I populated them with data from the code-behind.

    Please take a look at the approach I used and let me know if it works for you or if you need more info.

    Best wishes,
    Tina Stancheva
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top