The hierarchical level of the node.


model kendo.data.TreeListModel

The model whose level must be calculated.


Number the hierarchy level of the node.

Example - get the level of an item in the TreeListDataSource

  var dataSource = new kendo.data.TreeListDataSource({
    transport: {
      read: {
        url: "https://demos.telerik.com/kendo-ui/service/EmployeeDirectory/All",
        dataType: "jsonp"
    schema: {
      model: {
        id: "EmployeeID",
        parentId: "ReportsTo",
        fields: {
          ReportsTo: { field: "ReportsTo",  nullable: true },
          EmployeeID: { field: "EmployeeId", type: "number" }
        expanded: true
    change: function(e){
      var item = dataSource.get(9);
/* The result can be observed in the DevTools(F12) console of the browser. */
      console.log("Employee with name " + item.FirstName + "is at level: " + dataSource.level(item));
In this article
Not finding the help you need? Improve this article