removeRowReturns: grid

Remove row from the grid

Parameters

NameTypeDescription
id {string} Id of the record that needs to be removed.

Examples

sample

    
 <table id="grid"></table>
 <script>
     var grid;
     function Delete(e) {
         if (confirm('Are you sure?')) {
             grid.removeRow(e.data.id);
         }
     }
     grid = $('#grid').grid({
         primaryKey: 'ID',
         dataSource: [
             { 'ID': 1, 'Name': 'Hristo Stoichkov', 'PlaceOfBirth': 'Plovdiv, Bulgaria' },
             { 'ID': 2, 'Name': 'Ronaldo Luís Nazário de Lima', 'PlaceOfBirth': 'Rio de Janeiro, Brazil' },
             { 'ID': 3, 'Name': 'David Platt', 'PlaceOfBirth': 'Chadderton, Lancashire, England' }
         ],
         columns: [
             { field: 'ID' },
             { field: 'Name' },
             { field: 'PlaceOfBirth' },
             { title: '', width: 60, align: 'center', tmpl: 'Delete', events: { 'click': Delete } }
         ]
     });
 </script>