ExpandAll working?

4 posts, 0 answers
  1. Julien
    Julien avatar
    236 posts
    Member since:
    Jul 2010

    Posted 22 Sep 2010 Link to this post

    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
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 22 Sep 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Julien
    Julien avatar
    236 posts
    Member since:
    Jul 2010

    Posted 22 Sep 2010 Link to this post

    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.

  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 24 Sep 2010 Link to this post

    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
Back to Top