children
The child kendo.data.HierarchicalDataSource
of the node. This field is initialized lazily if the hasChildren
field is set or when the load
or append
methods were called.
Example - get the child nodes
<script>
var parentTask = new kendo.data.Node({ text: "Parent" });
parentTask.append({ text: "Child" });
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(parentTask.children.data().length); // outputs "1"
var child = parentTask.children.at(0);
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(child.text); // outputs "Child"
</script>
Example - sync the child datasource
<script>
var parentTask = new kendo.data.Node({ text: "Parent" });
parentTask.append({ text: "Child" }); // add new child node
parentTask.children.sync();
</script>
In this article