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