Search code examples
kendo-uikendo-treeviewkendo-datasource

How to get json data from Kendo UI treeview select event


I have retrieving the data from json for treeview. When i select the treeview, it will show the data which is belong from same json. How to get the data from json

 console.log("select",k.node)

This is used for get the data for selected node. But I want the data from JSON.


Solution

  • Most widgets have a dataItem method which gives you the corresponding data item in the data source:

    var item = e.sender.dataItem(e.node);