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

AutoExpand after modifying observable

3 Answers 44 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Bobby
Top achievements
Rank 1
Bobby asked on 09 Jun 2014, 08:21 PM
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

3 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 10 Jun 2014, 06:35 AM
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.
 
0
Bobby
Top achievements
Rank 1
answered on 10 Jun 2014, 01:11 PM
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.
0
Nick
Telerik team
answered on 11 Jun 2014, 08:31 AM
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.
 
Tags
TreeListView
Asked by
Bobby
Top achievements
Rank 1
Answers by
Nick
Telerik team
Bobby
Top achievements
Rank 1
Share this question
or