TreeView Appearence: when databind and hard code

2 posts, 0 answers
  1. Lee
    Lee avatar
    18 posts
    Member since:
    Jul 2010

    Posted 16 Jan 2012 Link to this post

    Admin and everyone!
     i have problem about RadTreeview, can anybody give me a help?

    I generated a treeview by the way of data-binding. But the treeview's default status is collapsed. I want the treeview's status is expanded, what should i do?
     <Controls:ContainerBinding PropertyName="IsExpanded" Binding="{Binding IsExpanded,Mode=OneTime}" />
    by this way, i can do it, but i have to add one property IsExpanded to my customer object. there is another way?

    best wishes
  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 17 Jan 2012 Link to this post

    Hello Lee ,

     Indeed, the ContainerBindings solution is the typical MVVM/XAML solution for this scenario. One thing to note here is that in SL 5 you can use Style Bindings instead, just like in WPF.
    If you are looking for a code behind solution and you need to expand all RadTreeViewItems, you can use the ExpandAll() method of the RadTreeView. Is this suitable for you ?

    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
Back to Top