Collapses the specified master table row. This hides its detail table row.


row String|Element|jQuery

A string, DOM element or jQuery object which represents the master table row. A string is treated as a jQuery selector.

omitAnimations Boolean

If set to false, the detail template is hidden without animations.

Example - collapse the first master table row

<div id="grid"></div>
let encode = kendo.htmlEncode;
  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");
// first expand the first master table row
In this article