title: JqGrid Update specific Rows
body: <p>Hi I am using jqGrid with   datatype: 'jsonstring'</p>
  
  <p>Now I want to update a particular row based on the values in the first column.
  What I mean</p>
  
  <p>JqGrid definition</p>
  
  <pre><code> $("#grid").empty().jqGrid({
                      datatype: 'jsonstring',
                      datastr: { rows: outputStr },
                      colNames: ['EmpName', 'Val1', 'Val2'],
                      colModel: [
                                 { name: 'EmpName', classes: 'EmpName', index: 'EmpName', width: 100, header: 'Currency' },
                                 { name: 'Val1',classes: 'Val1', index: 'Val1', width: 160 },
                                 { name: 'Val2', classes: 'Val2',index: 'Val2', width: 50 },
  jsonReader: {
                          repeatitems: false
                      },
  
  
                      rowNum: 10,
                      pager: '#pager',
                      viewrecords: true,
                      hoverrows: false,
                      caption: ""
                  }).navGrid('#pager',
                      { search: true, edit: false, add: false, del: false, refresh: false }, {}, {}, {},
                      { recreateFilter: true, overlay: true, multipleSearch: true, multipleGroup: true }
                  );
  </code></pre>
  
  <p>Consider my grid data as,</p>
  
  <pre>
  
      
      Johny 122 3123
      Tom 3123 5856
      Susan 124 434
      Cetra 242 2111
      
  
  </pre>
  
  <p>This is sample data in the grid. Now there is a function which gets updated data, just the data which is updated not the entire grid data. I mean when there is an update for 'Cetra', I receive update for 'Cetra' only</p>
  
  <p>The js function looks like</p>
  
  <pre><code>function getDetailUpdate(key, value)
  {
   var data = JSON.parse(value);
                  var row = $('#grid tr:contains(' + key + ')'); //here I get I am getting update data for who, e.g. 'Cetra'
  
                  var rowVal = $(row).closest('tr').attr('id');  //Here I get the row id
                  for (let i in data) {
                     // Below statement is not working
                      $("#grid").jqGrid('setRowData', row, {  'Val1': data[1], 'Val2': data[0]});
  
  //Below statement works and updates the changes but it is not updating in proper row cell, I have also set class names for the three td, and which value to update(which cell) I am getting in 'i')
                      $(row).closest('tr').children('td.' + i).text(data[i]);
                  }
  }
  </code></pre>
  
  <p>Any help is really appreciated. Thanks</p>