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

Columns

fields

The columns of the TreeList that are initialized from the columns option. Every item from the columns array has the same fields as the corresponding columns option.

columns

Array
<button id="countBtn">Log Column Names</button>
<div id="treelist"></div>
<script>
  $("#treelist").kendoTreeList({
    columns: [
      { field: "lastName" },
      { field: "position" }
    ],
    dataSource: [
      { id: 1, parentId: null, lastName: "Jackson", position: "CEO" },
      { id: 2, parentId: 1, lastName: "Weber", position: "	VP, Engineering" }
    ]
  });
  $("#countBtn").click(function(e){
    var treelist = $("#treelist").data("kendoTreeList");
    for (var i = 0; i < treelist.columns.length; i++) {
/* The result can be observed in the DevTools(F12) console of the browser. */
      console.log(treelist.columns[i].field); // displays "lastName" and then "position"
    }
  });
</script>
Not finding the help you need?
Contact Support