I would like to call a JavaScript function when a nodes' checkbox is clicked so that I can update anther control on screen. There is not a "OnChecked" event, so is it possible ?
Any help appreciated,
John
1 Answer, 1 is accepted
0
Dimiter Madjarov
Telerik team
answered on 30 Jun 2014, 09:00 AM
Hello John,
Indeed there is no built in onChecked event. Since the checked state of the items is stored in the dataSource, you could bind to it's change event to handle the checking (unchecking) of the items.
E.g.
$(function () {
var treeview = $("#treeview").data("kendoTreeView");
treeview.dataSource.bind("change", function (e) {
if (e.field == "checked") {
//an item was checked/unchecked
}
});
});
I hope this information helps.
Regards,
Dimiter Madjarov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.