Event fires when detail row is hiding
Parameters
Name | Type | Description |
---|---|---|
e | {object} | event data |
detailWrapper | {object} | the detail wrapper as jQuery object |
id | {string} | the id of the record |
Examples
sample
<table id="grid"></table>
<script>
var grid = $('#grid').grid({
primaryKey: 'ID',
dataSource: '/Players/Get',
detailTemplate: '<div></div>',
columns: [ { field: 'ID', width: 56 }, { field: 'Name' }, { field: 'DateOfBirth', type: 'date' } ]
});
grid.on('detailExpand', function (e, $detailWrapper, id) {
var record = grid.getById(id);
$detailWrapper.append('<b>Place Of Birth:</b>' + record.PlaceOfBirth);
});
grid.on('detailCollapse', function (e, $detailWrapper, id) {
$detailWrapper.empty();
alert('detailCollapse is fired.');
});
</script>