Kendo UI Treeview with check-boxes from remote data
I am trying to use the TreeView widget of kendo-ui. Consider the following
sample data:
[
{ id: 1, text: "Useraccess", items: [
{ id: 2, text: "Roles", items: [
{ id: 3, text: "Access" },
{ id: 4, text: "Edit" }
]},
{ id: 5, text: "Users", items: [
{ id: 6, text: "Access" },
{ id: 7, text: "Edit" }
]},
], ... }]
and the following treeview widget:
$("#treeView").kendoTreeView({
dataSource: dataSource,
checkboxes: {
checkChildren: true
}
});
It works fine but now I need to know which check boxes to have already
checked, depending on what the data I receive is. In the back end I have a
value that indicates which check box to check and I can include that
information in the data.
How do I implement this functionality? Is there anything built in or do I
have to find a workaround?
No comments:
Post a Comment