title: on editing a row using editGridRow function of Jqgrid, it not only edits data but also changes uneditable id column value to selrowid
body: <p>I am creating a jqgrid which is being populated by data from a jsp. It has 3 columns Name, Description and an uneditable column Id. I have 5 buttons : New, Modify, Delete, Ok and Cancel on the page.I want to let the user to edit/add data locally to jqgrid via a popup form and on click of save it adds to db.</p>
  
  <pre><code>$("#template-list").jqGrid
    ({ 
          url:'getTemplateCategories.jsp?TrUserId=122',
          datatype: 'xml', 
          mtype: 'post',
          colNames:['Name','Description','id','SaveAs'],
          colModel :[
                      {name:'Name',index:'Name', width:300, align:'left', sortable:false,xmlmap:"catName", editable:true},
                      {name:'Description',index:'Description', width:300, align:'left', sortable:false,xmlmap:"catDescription", editable:true},
                      {name:'id',index:'id', width:0, align:'left', sortable:false,xmlmap:"catId" , hidden: false},
                      {name:'SaveAs', index:'SaveAs', width:0, align:'left', sortable:false, hidden: false}
                     ],
          xmlReader: { 
                       root:"Categories", 
                       row:"item",                  
                       repeatitems:false                
                     },
          height : '461',
          scrollOffset:"0",
          hidegrid: "No",
          closeAfterAdd : true,   
          closeAfterEdit : true,    
          border: '2',
          pager: '#template-pager',
          viewrecords: true,
          minheight: '190',
          width: '600',
          autoheight: true,
          mtype:'POST',
          forceFit : true,    
          align:'left',   
          emptyrecords: "Nothing to display",
          rowNum:'20',
          paging: true,
          editurl: 'TemplateCategoryWebView.jsp',
          cellsubmit:'clientArray',               
          loadonce : true  
     });    
  </code></pre>
  
  <p>I am using the following code to add / edit a row on button click after row selection :</p>
  
  <pre><code> function add()
  {   
      $("#template-list").jqGrid('editGridRow',"new",{width:400,height:200,reloadAfterSubmit:false,closeAfterAdd:true});
  }
  function modify()
  {   
      var selRowId = $('#template-list').jqGrid('getGridParam','selrow');
      var rowid =  $('#template-list').jqGrid('getCell', selRowId, 'id') ;
      var rowData = $("#template-list").jqGrid('getRowData',rowid);
      if( selRowId)
      {
          $('#template-list').jqGrid('editGridRow',selRowId,{width:400,height:200,reloadAfterSubmit:false,closeAfterEdit:true});
          alert("selRowId  :  "+selRowId+"    rowid : "+rowid);
          EditCats=EditCats.concat(rowid) ;   
  
      }   
      else
      {
          alert("Please select a row");
      }
  }
  </code></pre>
  
  <p>Now when I edit a particular row, it opens that record and allows user to edit name and description values and when i click the submit button it not only saves edited values  locally in the jqgrid but also changes the "id" column value to value of "selRowId". Can someone please explain what is going on as I am at my wits end trying to fix this. I want this functionality to behave exactly as I mentioned and not by any other alternative method like inline editing because this is a migration project and they want to retain the way the functionality was working earlier(ie using popup screens) to reduce customer learning curve.I have been searching for a solution to this problem since quite some time but have not got one. </p>
  
  <p>It also tried passing the id value in editGridRow but its of no use. Please help.</p>
  
  <p>Thanks,
  Anita</p>