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

TreeView Appearence: when databind and hard code

1 Answer 44 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 17 Jan 2012, 03:05 AM
hi
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?




Anybody?
best wishes
thanks

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 17 Jan 2012, 05:18 PM
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 ?

Greetings,
Petar Mladenov
the Telerik team

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

Tags
TreeView
Asked by
Lee
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or