beforeEmptyRowInsert

Event fires before addition of an empty row to the grid.

Parameters

NameTypeDescription
e {object} event data
$row {object} The empty row as jquery object

Examples

sample

    
 <table id="grid"></table>
 <script>
     var grid = $('#grid').grid({
         dataSource: {
             url: '/0_6/Grid/GetPlayers',
             data: { searchString: 'not existing data' } //search for not existing data in order to fire the event
         },
         columns: [ { field: 'ID' }, { field: 'Name' }, { field: 'PlaceOfBirth' } ]
     });
     grid.on('beforeEmptyRowInsert', function (e, $row) {
         alert('beforeEmptyRowInsert is fired.');
     });
 </script>