hideColumn

Hides the specified column.

Parameters

column Number|String

The index of the column or the field to which the columns is bound.

Example - hiding a column by an index

<button id="btn">Hide Age Column</button>
<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "id" },
      { field: "name" },
      { field: "age" }
    ],
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22, expanded: true },
      { id: 2, parentId: 1, name: "John Doe", age: 24 },
      { id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
    ]
  });
  $("#btn").click(function(){
    var treeList = $("#treeList").data("kendoTreeList");
    treeList.hideColumn(2);
  });
</script>

Example - hiding a column by a field

<button id="btn">Hide Age Column</button>
<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "id" },
      { field: "name" },
      { field: "age" }
    ],
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22, expanded: true },
      { id: 2, parentId: 1, name: "John Doe", age: 24 },
      { id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
    ]
  });
  $("#btn").click(function(){
    var treeList = $("#treeList").data("kendoTreeList");
    treeList.hideColumn("age");
  });
</script>
In this article