Edit this page

columnResize

Fired when the user resizes 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.newWidth Number

The new column width.

e.oldWidth Number

The previous column width.

e.sender kendo.ui.Grid

The widget instance which fired the event.

Example - subscribe to the "columnResize" event during initialization

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  resizable: true,
  columnResize: function(e) {
    console.log(e.column.field, e.newWidth, e.oldWidth);
  }
});
</script>

Example - subscribe to the "columnResize" event after initialization

<div id="grid"></div>
<script>
function grid_columnResize(e) {
  console.log(e.column.field, e.newWidth, e.oldWidth);
}
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  resizable: true
});
var grid = $("#grid").data("kendoGrid");
grid.bind("columnResize", grid_columnResize);
</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