New to Kendo UI for jQuery? Download free 30-day trial

Access TreeView Node DataItem Property


Product Progress® Kendo UI® TreeView for jQuery
Product Version 2018.2.516


How can I access the DataItem ID value of a TreeView node?


To get a property from the model of a specific node, use the dataItem method of the TreeView.

The following example demonstrates the full implementation of the suggested approach by displaying an alert with the DataItem ID when a node is selected.

<div class="demo-section k-content">
  <div id="treeview"></div>
  var serviceRoot = "";
  homogeneous = new{
    transport: {
      read: {
        url: serviceRoot + "/Employees",
        dataType: "jsonp"
    schema: {
      model: {
        id: "EmployeeId",
        hasChildren: "HasEmployees"

  function onSelect(e) {
    var node = e.node;
    var treeview = $("#treeview").data("kendoTreeView");
    var dataItem = treeview.dataItem(node);
    alert("Employee ID of selected person: " + dataItem.EmployeeId);

    dataSource: homogeneous,
    dataTextField: "FullName",
    select: onSelect

See Also

In this article