This is a migrated thread and some comments may be shown as answers.
TreeView not DataBinding after page loads
1 Answer 19 Views
This is a migrated thread and some comments may be shown as answers.
Mat
Top achievements
Rank 1
Mat asked on 13 Aug 2018, 09:44 AM

I was finding that the tree view control would not display my data.

Using Prism I populate my view model when the page has been navigated to, not when the view model is being constructed.

This means that when the page first displays the tree view shows nothing. When the page loads and my observable collection is updated the changes are not reflected in the UI.

If I add a couple of fake values to the view model in its constructor, these are displayed, but not updated after the page loads its real data.

 

It seems that the tree view will only render what it finds when it is first data-bound. Does this sound correct to anyone else's observations? If so can anyone explain what good this would be to anyone? The data I wish to display comes from a network source so it must be loaded asynchronously and so cannot be part of the constructor.

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 14 Aug 2018, 02:14 PM
Hi Mat,

I have tested the described scenario and I reproduced the issue in the TreeView when the ItemsSourse is set after the control is initialized. I have logged this in our Feedback Portal and you could follow the item and track its progress on the link below: TreeView - Setting the ItemsSource after the control is initialized does not work properly. You could also find your Telerik points updated for reporting this. 

I am afraid I couldn't find a suitable workaround I could suggest. I have raised the priority of the item as it is a critical issue and we couldn't provide a feasible workaround for it. Hopefully we will manage to provide a fix in the upcoming R3 Release (expected in mid-September) or some of the upcoming minor releases.

I am sorry for the caused inconvenience. 

Regards,
Didi
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Asked by
Mat
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or