detailCollapse
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
<table id="grid"></table>
<script>
var grid = $('#grid').grid({
dataSource: '../Grid/GetPlayers',
detailTemplate: '<div/>',
columns: [
{ field: 'ID' },
{ field: 'Name' },
{ field: 'PlaceOfBirth' }
]
});
grid.on('detailExpand', function (e, $detailWrapper, record) {
$detailWrapper.append('Place of Birth: ' + record.PlaceOfBirth);
});
grid.on('detailCollapse', function (e, $detailWrapper, record) {
$detailWrapper.empty();
alert('detailCollapse is fired.');
});
</script>