updateRowReturns: grid

Update row data.

Parameters

NameTypeDescription
id {string} The id of the row that needs to be updated
record {object} Object with data for the new record.

Examples

sample

    
 <table id="grid"></table>
 <script>
     var grid, data;
     function Edit(e) {
         grid.updateRow(e.data.id, { 'ID': e.data.id, 'Name': 'Ronaldo', 'PlaceOfBirth': 'Rio, Brazil' });
     }
     grid = $('#grid').grid({
         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' }
         ],
         uiLibrary: 'jqueryui',
         columns: [
             { field: 'ID' },
             { field: 'Name' },
             { field: 'PlaceOfBirth' },
             { title: '', width: 20, type: 'icon', icon: 'ui-icon-pencil', events: { 'click': Edit } }
         ]
     });
 </script>