3 Answers, 1 is accepted
0
Hi Julien,
I couldn't reproduce the issue. Can you please take a look at the attached example and let me know if I am missing something. Thank you in advance.
Greetings,
Tina Stancheva
the Telerik team
I couldn't reproduce the issue. Can you please take a look at the attached example and let me know if I am missing something. Thank you in advance.
Greetings,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

Julien
Top achievements
Rank 1
answered on 22 Sep 2010, 10:26 AM
I modified your project to show the problem, you can get it here:
http://dl.dropbox.com/u/368403/TreeViewExpand.zip
In my real project I do the LoadData(); not in the constructor(I'm creating all view at the start of the application, and when I switch to the view, I do the loadData.
http://dl.dropbox.com/u/368403/TreeViewExpand.zip
In my real project I do the LoadData(); not in the constructor(I'm creating all view at the start of the application, and when I switch to the view, I do the loadData.
0
Hello Julien,
You can check out this article http://www.telerik.com/help/wpf/radtreeview-feautres-treeviewitem-expanding-and-collapsing-items.html .The section Expanding and Collapsing TreeView Items Recursively is the one you need. Please note that :
"The ExpandAll() and CollapseAll() methods work only after the first level items have been loaded. This is visible only when the treeview is bound. Therefore it should be called only in or after the Loaded event."
Therefore invoking the ExpandAll() method before the Loaded() event is fired doesn't work. I modified your example to illustrate the sequence of events. Please take a look at it and let me know if you need more info.
Regards,
Petar Mladenov
the Telerik team
You can check out this article http://www.telerik.com/help/wpf/radtreeview-feautres-treeviewitem-expanding-and-collapsing-items.html .The section Expanding and Collapsing TreeView Items Recursively is the one you need. Please note that :
"The ExpandAll() and CollapseAll() methods work only after the first level items have been loaded. This is visible only when the treeview is bound. Therefore it should be called only in or after the Loaded event."
Therefore invoking the ExpandAll() method before the Loaded() event is fired doesn't work. I modified your example to illustrate the sequence of events. Please take a look at it and let me know if you need more info.
Regards,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items