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: '/Players/Get',
             data: { name: 'not existing data' } //search for not existing data in order to fire the event
         },
         columns: [ { field: 'ID', width: 56 }, { field: 'Name' }, { field: 'PlaceOfBirth' } ]
     });
     grid.on('beforeEmptyRowInsert', function (e, $row) {
         alert('beforeEmptyRowInsert is fired.');
     });
 </script>