New to Kendo UI for jQueryStart a free 30-day trial

DataItem

methods

Returns the data item to which the specified node is bound.

Parameters:nodejQuery|Element|String

A string, DOM element or jQuery object which represents the node. A string is treated as a jQuery selector.

Returns:kendo.data.Node

The model of the item that was passed as a parameter.

<div id="treeview"></div>
<script>
$("#treeview").kendoTreeView({
  dataSource: [
    { id: 1, text: "foo" },
    { id: 2, text: "bar" }
  ]
});

var treeview = $("#treeview").data("kendoTreeView");
var dataItem = treeview.dataItem(".k-treeview-item:first");
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(dataItem.text); // displays "foo"
</script>

See also: getting the node data in the select event handler

Not finding the help you need?
Contact Support