New to Kendo UI for jQuery? Start a free 30-day trial

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.

<div id="grid"></div>
<script>
let encode = kendo.htmlEncode;
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ],
  detailTemplate: ({ name, age }) => `<div>Name: ${encode(name)}</div><div>Age: ${encode(age)}</div>`,
  detailCollapse: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(e.masterRow, e.detailRow);
  }
});
</script>
<div id="grid"></div>
<script>
let encode = kendo.htmlEncode;
function grid_detailCollapse(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
  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: ({ name, age }) => `<div>Name: ${encode(name)}</div><div>Age: ${encode(age)}</div>`
});
var grid = $("#grid").data("kendoGrid");
grid.bind("detailCollapse", grid_detailCollapse);
</script>
Not finding the help you need?
Contact Support