parentNode

Gets the parent node.

Returns

kendo.data.Node—The parent of the node. Returns null if the node is a root node or does not have a parent.

Example - get the parent node

<script>
var dataSource = new kendo.data.HierarchicalDataSource({
   data: [
       {
           id: 1,
           text: "Root",
           items: [
               { id: 2, text: "Child" }
           ]
       }
   ]
});
dataSource.read();
var root = dataSource.get(1);
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(root.parentNode()); // outputs "null"
root.load(); // load child nodes
var child = dataSource.get(2);
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(child.parentNode().text); // outputs "Root"
</script>
In this article