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

How to implement leaf only selection in kendo-treeview?

1 Answer 221 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Merlin
Top achievements
Rank 1
Merlin asked on 21 Dec 2018, 03:57 AM
How to implement leaf only selection in kendo-treeview? I can't find sth like isSelectable in api. Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Svet
Telerik team
answered on 24 Dec 2018, 12:14 PM
Hi Merlin,

We could use the checkedKeys input property of the kendoTreeViewCheckable directive in combination with handling the (checkedChange) event. This will allow us to modify the checked items based on any custom logic as per the requirements of the scenario, every time we check or uncheck an item. See the following example demonstrating how we can check only the children of a TreeView's item:
https://stackblitz.com/edit/angular-fbb6l2-hihc6b?file=app/app.component.ts

I hope this helps.

Regards,
Svetlin
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Merlin
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or