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

Unknown number of levels

1 Answer 56 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
JAS J
Top achievements
Rank 1
JAS J asked on 06 Aug 2011, 12:33 AM
Hi, I am trying to create a treeview to display the following class:
class foo
{
 public string
name;
 public list<foo> children
}
public List<
foo> theFooToDisplay = new List<foo>

in the hierarchydata template I have the following:

<telerik:HierarchicalDataTemplate x:Key="foohdt"

 

     ItemsSource="{Binding theFooToDisplay }">
<TextBlock Text="{Binding Name}" />
</telerik:HierarchicalDataTemplate>

<telerik:RadTreeView ItemsSource="{Binding theFooToDisplay }"
ItemTemplate="{StaticResource foohdt}" />

Could I get some help with the template?

thanks!
Jas


How do I make the treeview use the same datatemplate for all the items?

1 Answer, 1 is accepted

Sort by
0
JAS J
Top achievements
Rank 1
answered on 07 Aug 2011, 05:39 AM
Never mind... figured it out. had a datatemplate int he code that was not necessary.
Tags
TreeView
Asked by
JAS J
Top achievements
Rank 1
Answers by
JAS J
Top achievements
Rank 1
Share this question
or