AutoExpand after modifying observable

4 posts, 0 answers
  1. Bobby
    Bobby avatar
    6 posts
    Member since:
    Jun 2014

    Posted 09 Jun 2014 Link to this post

    I have the AutoExpandItems property set to true on my RadTreeListView and it works great on the initial load. However after I change the RadObservableCollection it does not properly autoexpand and only some rows show up until I force a refresh on the screen.
    My two use cases are
    Changing or deleting an object in the observable collection,
    Clearing the collection and then calling AddRange.

    Let me know if this is unclear or you need more information.
    Thank you
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 10 Jun 2014 Link to this post

    Hi Bobby,

    The idea of AutoExpandItems is to expand items only on initial Data Load of RadTreeListView, and it does not guarantee that any added items will be expanded right after add. You can use the ExpandHierarchyItem method for that purpose. 


    Hope this makes sense. 

    Regards,
    Nik
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Bobby
    Bobby avatar
    6 posts
    Member since:
    Jun 2014

    Posted 10 Jun 2014 in reply to Nick Link to this post

    Hi Nik,
    Thanks for your reply. 
    My issue goes beyond just expanding the rows manually.
    When AutoExpandItems=True and I modify my radObservableCollection by adding/removing items I see the following.
    Not all top level rows are displayed.
    The top level row that is displayed is marked as expanded but no children are there
    Collapsing and expanding the top level row causes some but not all children to appear (it also adds an additional empty row)
    Setting and removing a filter or sorting by a column causes all data to appear.


    When AutoExpandItems=False and a row is added/removed everything starts collapsed as expected and expanding items shows all the expected children.
    Why does AutoExpandItems=True cause this inconsistent view and is there a workaround? I do not expect these new rows to come in marked expanded and show an inaccurate view of the data.
  5. Nick
    Admin
    Nick avatar
    593 posts

    Posted 11 Jun 2014 Link to this post

    Hello Bobby,

    Indeed this sounds very strange. Will it be possible to specify the version of your controls and if possible provide a small sample where we can observe the problem in order to debug it and provide a solution in the shortest terms? 

    Thank you in advance. 

    Regards,
    Nik
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top