columnUnstick

Fired when the user unsticks a column.

The event handler function context (available via 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.Grid

The widget instance which fired the event.

Example - subscribe to the "columnUnstick" event during initialization

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "id", width: 800, stickable: true },
    { field: "name", width: 400, sticky: true, stickable: true },
    { field: "age", width: 800, stickable: true }
  ],
  columnMenu: true,
  columnUnstick: function(e) {
    console.log(e.column.field); // displays the field of the just unsticked column
  },
  dataSource: [ { id: 1, name: "Jane Doe", age: 30 }, { id: 2, name: "John Doe", age: 33 } ]
});
</script>

Example - subscribe to the "columnUnstick" event after initialization

<div id="grid"></div>
<script>
function grid_columnUnstick(e) {
  console.log(e.column.field); // displays the field of the just unsticked column
}
$("#grid").kendoGrid({
  columns: [
    { field: "id", width: 800, stickable: true },
    { field: "name", width: 400, sticky: true, stickable: true },
    { field: "age", width: 800, stickable: true }
  ],
  columnMenu: true,
  dataSource: [ { id: 1, name: "Jane Doe", age: 30 }, { id: 2, name: "John Doe", age: 33 } ]
});
var grid = $("#grid").data("kendoGrid");
grid.bind("columnUnstick", grid_columnUnstick);
</script>
In this article
Not finding the help you need? Improve this article