columnUnlock

Fires when the user unlock 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 columnUnlock event during initialization

<div id="treeList" style="width: 400px"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "id", locked: true, width: 150 },
      { field: "name", width: 150 },
      { field: "age", width: 150 }
    ],
    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 }
    ],
    scrollable: true,
    columnMenu: true,
    columnUnlock: 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 just locked column
    }
  });
</script>

Example - subscribing to the columnUnlock event after initialization

<div id="treeList" style="width: 400px"></div>
<script>
  function treeList_columnUnlock(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(e.column.field); // displays the field of the just locked column
  }

  $("#treeList").kendoTreeList({
    columns: [
      { field: "id", locked: true, width: 150 },
      { field: "name", width: 150 },
      { field: "age", width: 150 }
    ],
    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 }
    ],
    scrollable: true,
    columnMenu: true
  });

  var treeList = $("#treeList").data("kendoTreeList");
  treeList.bind("columnUnlock", treeList_columnUnlock);
</script>
In this article