Event fires before deletion of row in the grid.
Parameters
Name | Type | Description |
---|---|---|
e | {object} | event data |
$row | {object} | the row presented as jquery object |
id | {object} | the id of the record |
record | {object} | the data of the row record |
Examples
sample
<button onclick="grid.removeRow('1')">Remove Row</button><br/>
<table id="grid"></table>
<script>
var grid = $('#grid').grid({
primaryKey: 'ID',
dataSource: [
{ 'ID': 1, 'Name': 'Hristo Stoichkov', 'PlaceOfBirth': 'Plovdiv, Bulgaria' },
{ 'ID': 2, 'Name': 'Ronaldo Luis Nazario de Lima', 'PlaceOfBirth': 'Rio de Janeiro, Brazil' },
{ 'ID': 3, 'Name': 'David Platt', 'PlaceOfBirth': 'Chadderton, Lancashire, England' }
],
columns: [ { field: 'ID' }, { field: 'Name' }, { field: 'PlaceOfBirth' } ]
});
grid.on('rowRemoving', function (e, $row, id, record) {
alert('rowRemoving is fired for row with id=' + id + '.');
});
</script>