New to Kendo UI for Angular? Start a free 30-day trial
SelectionMode
Represents the available selection modes of the TreeView component.
ts
@Component({
selector: 'my-app',
template: `
<kendo-treeview
[nodes]="data"
[kendoTreeViewSelectable]="{ mode: 'multiple' }"
kendoTreeViewExpandable
kendoTreeViewHierarchyBinding
childrenField="items"
textField="text"
>
</kendo-treeview>
<i>Press ENTER key or use mouse click to select an item</i>
`
})
class AppComponent {
public data: any[] = [
{
text: "Furniture", items: [
{ text: "Tables & Chairs" },
{ text: "Sofas" },
{
text: "Occasional Furniture", items: [{
text: "Decor", items: [
{ text: "Bed Linen" },
{ text: "Curtains & Blinds" },
{ text: "Carpets" }
]
}]
}
]
}
];
}
type
SelectionMode = "single" | "multiple";