I have a treeView with multiple hierarchy, and only leaf/last node should have checkbox, not any parent should have checkbox.
I have refered many threads and examples. Tried Checkboxes Template but that makes another issue that values did not get binded with checkbox.
I need treeview like (https://jsbin.com/edamuj/131/edit?html,output)
@(Html.Kendo().TreeView()
.Name("treeview")
.Events(e => e.Select("OnSelectTree").DataBound("OnDataBound")).ExpandAll(true)
.Checkboxes(checkboxes => checkboxesName("checkedFiles"))
.BindTo((List<DPS.Model.ReviewDocumentTreeViewItemModel>)ViewBag.DocumentTreeData, (Kendo.Mvc.UI.Fluent.NavigationBindingFactory<TreeViewItem> mappings) =>
{
mappings.For<DPS.Model.ReviewDocumentTreeViewItemModel>(binding => binding.ItemDataBound((item, category) =>
{
item.Id = category.Id;
item.Text = category.Name;
item.Selected = category.IsSelected;
item.HtmlAttributes.Add("data-allowselection", category.AllowSelection);
item.Expanded = true;
item.Checked = category.IsReviewed;
}).Children(g => g.Items));
}))