columnHide
Fires when the user hides a column. The event handler function context (available through the this
keyword) will be set to the widget instance.
Event Data
e.column Object
A JavaScript object which represents the column configuration.
e.sender kendo.ui.TreeList
The widget instance which fired the event.
Example - subscribing to the columnHide event during initialization
<div id="treeList"></div>
<script>
$("#treeList").kendoTreeList({
columns: [
{ field: "id" },
{ field: "name" },
{ field: "age" }
],
dataSource: {
data: [
{ id: 1, parentId: null, name: "Jane Doe", age: 22 },
{ id: 2, parentId: 1, name: "John Doe", age: 24 }
]
},
columnMenu: true,
columnHide: function(e){
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.column.field); // displays the field of the hidden column
}
});
</script>
Example - subscribing to the columnHide event after initialization
<div id="treeList"></div>
<script>
function treelist_columnHide(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.column.field); // displays the field of the hidden column
}
$("#treeList").kendoTreeList({
columns: [
{ field: "id" },
{ field: "name" },
{ field: "age" }
],
dataSource: {
data: [
{ id: 1, parentId: null, name: "Jane Doe", age: 22 },
{ id: 2, parentId: 1, name: "John Doe", age: 24 }
]
},
columnMenu: true
});
var treelist = $("#treeList").data("kendoTreeList");
treelist.bind("columnHide", treelist_columnHide);
</script>