detailExpand
Fired when the user expands 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 "detailExpand" 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>",
detailExpand: function(e) {
console.log(e.masterRow, e.detailRow);
}
});
</script>
Example - subscribe to the "detailExpand" event after initialization
<div id="grid"></div>
<script>
function grid_detailExpand(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("detailExpand", grid_detailExpand);
</script>