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

Problem with Heirar

0 Answers 35 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 18 Nov 2011, 01:30 PM
Trying to set up a RadTreeView using telerik:HeirarchicalDataTemplate, can't use the Key attribute as it gives an error (Key attribute can only be used on a tag contained in an IDictionary type property).

Suggestions?

Jonathan

<telerik:HierarchicalDataTemplate x:Key="EventItemTemplate">
    <TextBlock Text="{Binding EventItemDescription}" />
</telerik:HierarchicalDataTemplate>
<telerik:HierarchicalDataTemplate x:Key="CategoryTemplate" ItemTemplate="{StaticResource EventItemTemplate}" >
    <TextBlock Text="{Binding CategoryName}" />
</telerik:HierarchicalDataTemplate>
<telerik:RadTabItem Header="Tree View" HorizontalAlignment="Stretch" Name="tabTreeView" Background="#FF84CBEA" VerticalAlignment="Stretch">
    <telerik:RadTreeView Name="radTreeView1" 
                         HorizontalAlignment="Stretch" 
                         VerticalAlignment="Stretch" 
                         ItemsSource="{Binding Data, ElementName=webAV}" 
                         ItemTemplate="{StaticResource CategoryTemplate}">
    </telerik:RadTreeView>
</telerik:RadTabItem>

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Jonathan
Top achievements
Rank 1
Share this question
or