Items disappear when collapsed

4 posts, 0 answers
  1. Bob
    Bob avatar
    9 posts
    Member since:
    Nov 2010

    Posted 15 Apr 2011 Link to this post

    Hi. I'm using the WPF RadTreeListView with EnableRowVirtualization = false and EnableColumnVirtualization = false. I hook the TreeListViewRow's IsExpandedChanged event and, in the handler, I go through all the RadTreeListView's Items. Ultimately, I want to get the item containers (the TreeListViewRows) for each item.

    But when an row is collapsed (as opposed to expanded) all its child items disappear from RadTreeListView's Items collection! When I expand the row, the child items come back.

    Even if virtualization were on, that should only affect the existance of TreeListViewRows, not the existence of Items. How do I fix this?

    Thanks,
       Bob Alexander
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 18 Apr 2011 Link to this post

    Hello Bob,

     Indeed this is how our treelist will work on expand/collapse. When you expand child items will be added and when you collapse child items will be removed. Our hierarchical collection works with Reset action since the earlier versions with add/remove actions proved to be very very slow. 

    Regards,
    Vlad
    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. Bob
    Bob avatar
    9 posts
    Member since:
    Nov 2010

    Posted 26 Apr 2011 Link to this post

    Hi Vlad,

    Thank you (and pardon my late response; I was on vacation). What I need to do is find an item's parent, whether that item is currently visible or not (or its parent is visible or not). I was hoping to get the item's container (the TreeListViewRow), get the row's parent, then get the DataContext from that. I can't rely on the item object having a reference to its parent, because I don't have total control over the item's implementation.

    So, is there a way for me to reliably find an item's parent in a RadTreeListView?

    Thanks,
       Bob
  5. Bob
    Bob avatar
    9 posts
    Member since:
    Nov 2010

    Posted 28 Apr 2011 Link to this post

    Is there no solution? No way for a RadTreeListView to walk its hierarchy?

    - Bob
Back to Top