showColumn
Shows the specified column.
Parameters
column Number|String
The index of the column, or the field to which the columns is bound.
Example - showing a hidden column by an 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 - showing a hidden column by a 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>