destroying

Event fires when the grid.destroy method is called.

Parameters

NameTypeDescription
e {object} event data

Examples

sample

    
 <button id="btnDestroy" class="gj-button-md">Destroy</button>
 <br/><br/>
 <table id="grid"></table>
 <script>
     var grid = $('#grid').grid({
         dataSource: '/Players/Get',
         columns: [ { field: 'ID', width: 56 }, { field: 'Name' }, { field: 'PlaceOfBirth' } ]
     });
     grid.on('destroying', function (e) {
         alert('destroying is fired.');
     });
     $('#btnDestroy').on('click', function() {
         grid.destroy();
     });
 </script>