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) {
/* The result can be observed in the DevTools(F12) console of the browser. */
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) {
/* The result can be observed in the DevTools(F12) console of the browser. */
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>