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

ExpandAll working?

3 Answers 92 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 22 Sep 2010, 09:50 AM
Hi!

After I load my data in my bounded list, I'm doing an "ExpandAll" on my tree, but nothing is expanding. Why?

Thank you

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 22 Sep 2010, 10:03 AM
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
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.

0
Petar Mladenov
Telerik team
answered on 24 Sep 2010, 02:59 PM
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
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
Tags
TreeView
Asked by
Julien
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Julien
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or