Is there a way to use a Switch control instead of checkbox in a TreeView? I am able to use ItemTemplate to insert a switch next to the checkbox but I need to replace the checkbox and have the switch use CheckChildren and CheckParents.
Any ideas?
Thanks!
<TelerikTreeView OnItemRender="@OnItemRender" CheckBoxMode="TreeViewCheckBoxMode.Multiple" CheckChildren="true" CheckParents="true" Data="@FlatData" @bind-ExpandedItems="@ExpandedItems">
<TreeViewBindings>
<TreeViewBinding TextField="Text" IdField="Id" ParentIdField="ParentId" ItemsField="Text" HasChildrenField="HasChildren" IconField="Icon">
<ItemTemplate>
@{var treeItem = (TreeItem)context; }
<div class="treeview-item">
<TelerikSwitch @bind-Value="treeItem.IsChecked" />
<span>@treeItem.Text</span>
</div>
</ItemTemplate>
</TreeViewBinding>
</TreeViewBindings>
</TelerikTreeView>