Problem with Heirar

1 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    24 posts
    Member since:
    Aug 2011

    Posted 18 Nov 2011 Link to this post

    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>
Back to Top