Edit this page

showColumn

Shows the specified column.

Parameters

column Number |String

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

Example - show a hidden column by index

<button id="btn">Show Age Column</button>
<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "id" },
      { field: "name" },
      { field: "age", hidden: true }
    ],
    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.showColumn(2);
  });
</script>

Example - show a hidden column by field

<button id="btn">Show Age Column</button>
<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "id" },
      { field: "name" },
      { field: "age", hidden: true }
    ],
    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.showColumn("age");
  });
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy