removeRow Returns: grid


Remove row from the grid

Parameters

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

Examples

  
Edit this example
<table id="grid"></table> <script> var grid; function Delete(e) { if (confirm('Are you sure?')) { grid.removeRow(e.data.id); } } grid = $('#grid').grid({ dataKey: '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: 20, type: 'icon', icon: 'ui-icon-close', events: { 'click': Delete } } ] }); </script>