destroying

Event fires when the grid.destroy method is called.

Parameters

NameTypeDescription
e {object} event data

Examples

sample

    
 <button id="btnDestroy">Destroy</button>
 <br/><br/>
 <table id="grid"></table>
 <script>
     var grid = $('#grid').grid({
         dataSource: '/0_6/Grid/GetPlayers',
         columns: [ { field: 'ID' }, { field: 'Name' }, { field: 'PlaceOfBirth' } ]
     });
     grid.on('destroying', function (e) {
         alert('destroying is fired.');
     });
     $('#btnDestroy').on('click', function() {
         grid.destroy();
     });
 </script>