groupCollapse
Fired when the user collapses a group row.
The event handler function context (available via the this
keyword) will be set to the widget instance.
Introduced in the Kendo UI 2017 R3 (2017.3.913) release.
Event Data
e.element jQuery
The jQuery object which represents the group row.
e.group Object
The group object associated with group row.
e.preventDefault Function
If invoked prevents collapsing of the group.
e.sender kendo.ui.Grid
The widget instance which fired the event.
Example - subscribe to the "groupCollapse" event during initialization
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
groupable: true,
dataSource: [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 }
],
groupCollapse: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.element, e.group);
}
});
</script>
Example - subscribe to the "groupCollapse" event after initialization
<div id="grid"></div>
<script>
function grid_groupCollapse(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.element, e.group);
}
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
groupable: true,
dataSource: [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 }
]
});
var grid = $("#grid").data("kendoGrid");
grid.bind("groupCollapse", grid_groupCollapse);
</script>