Edit this page

detailCollapse

Fired when the user collapses a detail table row.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.detailRow jQuery

The jQuery object which represents the detail table row.

e.masterRow jQuery

The jQuery object which represents the master table row.

e.sender kendo.ui.Grid

The widget instance which fired the event.

Example - subscribe to the "detailCollapse" 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 }
  ],
  detailTemplate: "<div>Name: #: name #</div><div>Age: #: age #</div>",
  detailCollapse: function(e) {
    console.log(e.masterRow, e.detailRow);
  }
});
</script>

Example - subscribe to the "detailCollapse" event after initialization

<div id="grid"></div>
<script>
function grid_detailCollapse(e) {
  console.log(e.masterRow, e.detailRow);
}
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  detailTemplate: "<div>Name: #: name #</div><div>Age: #: age #</div>"
});
var grid = $("#grid").data("kendoGrid");
grid.bind("detailCollapse", grid_detailCollapse);
</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