I would like a node click event exposed from the treeview.
At the moment, you need to use a template. Example and considerations are available in the following forum thread: https://www.telerik.com/forums/row-click-and-double-click-events#PQpO8DcbzkCArF3UqoLcWA.
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)
---
I need to be able to multiselect items in a treeview and drag n drop to reorder items.
(Same as RadTreeView AJAX component)
Hi everyone,
We created this item to request your feedback on how you use the treeview binding with regards to the Expanded state of the nodes.
At the moment, the treeview updates the field in the collection when an item gets expanded or collapsed, and that makes it unique in the suite - the other data bound components do not alter their data source silently, and this is the general pattern we want to follow in order to have consistency across the board.
Thus, there are several approaches we are considering and we want to get your take on how you would find this most comfortable:
Hi.
I'd like to request the ability to set the Enabled property on check boxes in the treeview.
For example, given a tree view with check boxes:
<TelerikTreeView Data="@StorageItems"
@bind-CheckedItems="@CheckedItems"
CheckBoxMode="TreeViewCheckBoxMode.Multiple"
CheckParents="true"
CheckChildren="true" />
I'd like to make the tree view read-only so the check boxes appear disabled and the user cannot check-mark or uncheck-mark them.
Thank you.
I have an extensive WPF background and so I naturally use ObservableCollection for virtually all UI type binding scenarios.
However I noticed that it seems the TreeView control doesn't seem to work when bound that way.
I switched the property to an array instead and it worked with no other modifications.
Add checkbox support at the node level. Similar to...
https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes/
The TreeView has CheckBoxMode="@TreeViewCheckBoxMode.Multiple" and CheckParents="true". Only some checkboxes are checked and there are parent checkboxes in indeterminate state.
When I try to clear all checked checkboxes, the indeterminate checkboxes are not cleared and maintain their state.
ADMIT EDIT:
Initially, this bug report was about unchecking all child items. However, it appears that the opposite behavior exists too - if all children are checked programmatically, the parent checkbox will show as indeterminate. In this case, check the parent explicitly as well.
Checking a checkbox of a on demand-loaded child then collapsing and reopening its parent makes the checkbox disappear. However, it is still checked in the CheckedItems collection, but just not in the UI. See this REPL example. Steps...
1. Expand a top level item
2. Check its child checkbox
3. Collapse the top level item
4. Expand it again
Result: checkbox gone (in the UI)
After upgrade to 3.0, when expanding a checked tree node, the child items are not checked. Also, if the child items are checked, but the parent is collapsed and expanded again, the checked children are unchecked.
This can be replicated on the online demo.
Hello,
I am trying to fill the TreeView using an async method. The first level is loaded an expanded. Subsequent levels are not. Or so it seams. They are loaded, but when expanding a node it expands and immediately collapses. Expanding a second time reveals the nodes loaded earlier.
I included a demo project. Open http://localhost:{port}/tree.
Best regards,
Marcel Gelijk
The issue manifests both when
Happens in 2.14.1 first.
*** Thread created by admin on customer behalf ***
When using load-on-demand, you may not know how much data there is and how many levels deep it will go. You need the OnExpand event to fire for each node so you can call your services and retrieve data.
Unfortunately, it does not fire for the second level of nodes, so you cannot load data for them.
We have the following scenario:
The problem is when you close the dialog before the loading is finished, a NullReferenceException occurs.
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Blazor.Components.Common.Trees.TelerikTreeDataSource.GetTreeItems(IEnumerable`1 data, Int32 level, String parentIndex)