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

Hierarchical Data Template Treeview

1 Answer 88 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Prasad Saravate
Top achievements
Rank 1
Prasad Saravate asked on 11 Mar 2010, 06:08 PM
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

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 12 Mar 2010, 12:46 PM
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.
Tags
TreeView
Asked by
Prasad Saravate
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or