Edit this page

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) {
    console.log(e.element, e.group);
  }
});
</script>

Example - subscribe to the "groupCollapse" event after initialization

<div id="grid"></div>
<script>
function grid_groupCollapse(e) {
  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>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy