Unknown number of levels

2 posts, 0 answers
  1. JAS J
    JAS J avatar
    39 posts
    Member since:
    May 2010

    Posted 05 Aug 2011 Link to this post

    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?
  2. JAS J
    JAS J avatar
    39 posts
    Member since:
    May 2010

    Posted 07 Aug 2011 Link to this post

    Never mind... figured it out. had a datatemplate int he code that was not necessary.
  3. DevCraft banner
Back to Top