Reputation: 23
I'm trying to add the onSelect event to the following code:
var treeview = $("#treeview").kendoTreeView({
animation:true,
dragAndDrop:false,
select: onSelect,
}).data("kendoTreeView");
// onSelect function call
function onSelect(e) {
kendoConsole.log("Selecting: " + this.text(e.node));
}
It is not working. All I want is to select a parent node.
Upvotes: 1
Views: 2015
Reputation: 1387
If i am not wrong, you want to select a parent node of a node you selected, i have made small fiddle for you. You have to prevent (e.preventDefault()
) the default behavior of select event. I am simply using parent and select client APIs.
Edit: Sorry, i accidentally deleted the fiddle, i have linked the working one.
Upvotes: 2