Completed
Last Updated: 28 Apr 2022 12:12 by ADMIN
Jack
Created on: 07 Dec 2020 07:15
Category: TreeView
Type: Feature Request
23
Track changes in properties when TreeView is bound to observable collection.

The TreeView should automatically update when a change in data fields occur. Changes in the `ItemsField`, `HasChildren` are crucial to be tracked to allow easy manipulation of data in binding to hierarchical data. This request will fulfill the observable collection support of the TreeView.

---

ADMIN EDIT

Changes in the ExpandedField of the element have been previously handled in the TreeView. However, this has been a side effect of incorrect code in our component that was causing performance hit. We reviewed our component and how it could provide better coverage in user scenarios, so here are our steps:

- Implement tracking of data item changes with ObservableCollection, so that we could fully support binding to observable data - click the Vote and Follow buttons on the current page to raise the priority of this feature implementation and to get notified for status updates.



We've been evaluating a major change where the ExpandedItems to be controlled via parameter/state. So, we would really appreciate if you could share feedback whether this change would be good for your project and use case.

- Implementation of ExpandedItems in TreeView to substitute ExpandedField in the collection: https://feedback.telerik.com/blazor/1448095-expanded-items-handling-feedback-requested

We believe that the above steps are the way to go with the maturing of the TreeView component.

 

A workaround could be reinitializing the Data when you update the property of the item, that will force the treeview to update:

TreeViewData = new List<MyModel>(TreeViewData)

---

Duplicated Items
1 comment
ADMIN
Joana
Posted on: 28 Apr 2022 12:11

Hi everyone,

In 3.3.0 release scheduled for mid May we will include a `Rebind` method for the TreeView component. The method will process the data and update the nodes accordingly. This is the solution that we decided to release in order to:

- Provide alternative for updating the nodes without a mandatory requirement for the usage of `Observable` collection

- Avoid requiring our customers to implement INotifyPropertyChanged

- Avoid performance issues of listening to all changed properties of the model. In addition, the Rebind method might perform better than declaring the Data parameter once again.

Thus, I am making this request Completed. However, any feedback is welcome and we will explore all scenarios.

Regards,
Joana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.