title: Reload of jqgrid not happening with loadonce:true
body: <p>I am newbie in using jqgrid.</p>
  
  <p>While new page load the grid is properly loading the data from database. Afterwards due to loadonce: true the grid is not reloading the data from database for add/edit/delete.</p>
  
  <p>My application combination is JSP, Servlet, MySQL</p>
  
  <p>I have a grid with following settings</p>
  
  <pre><code>jQuery("#userList").jqGrid({
                      url: '&lt;%=request.getContextPath()%&gt;/userJqGrid?q=1&amp;action=fetchData&amp;userCookie=&lt;%= encodedCookie%&gt;',
                      datatype: 'xml',
                      mtype: 'GET',
                      colNames:['&lt;%= userProp.getProperty(userColNames[0])%&gt;',
                                '&lt;%= userProp.getProperty(userColNames[1])%&gt;',
                                '&lt;%= userProp.getProperty(userColNames[2])%&gt;',
                                '&lt;%= userProp.getProperty(userColNames[3])%&gt;',
                                '&lt;%= userProp.getProperty(userColNames[4])%&gt;',
                                '&lt;%= userProp.getProperty(userColNames[5])%&gt;'
  ],
                      colModel:[
                          {name:'&lt;%= userColNames[0]%&gt;',index:'&lt;%= userColNames[0]%&gt;',
                              width:120,sortable:true,editable:true,editrules:{required:true},formoptions:{rowpos:1, elmprefix:'*'}},
                          {name:'&lt;%= userColNames[1]%&gt;',index:'&lt;%= userColNames[1]%&gt;',
                              width:130,sortable:true,editable:true},
                          {name:'&lt;%= userColNames[2]%&gt;',index:'&lt;%= userColNames[2]%&gt;',
                              width:100,sortable:true,editable:true,editrules:{required:true},formoptions:{rowpos:3, elmprefix:'*'}},
                          {name:'&lt;%= userColNames[3]%&gt;',index:'&lt;%= userColNames[3]%&gt;',
                              width:180,sortable:true,editable:true,editrules:{email:true,required:true},formoptions:{rowpos:4, elmprefix:'*'}},
                          {name:'&lt;%= userColNames[4]%&gt;',index:'&lt;%= userColNames[4]%&gt;', 
                              width:100,sortable:true,editable:true},
                          {name:'&lt;%= userColNames[5]%&gt;',index:'&lt;%= userColNames[5]%&gt;', 
                              width:100,sortable:true,editable:true},
                      ],
                      pager: '#pager1',
                      rowNum:50,
                      height:'auto',
                      //rowList:[10,20,30],
                      loadonce: true,
                      sortname:'&lt;%= userColNames[0]%&gt;',
                      viewrecords: true,
                      editurl:'&lt;%=request.getContextPath()%&gt;/userJqGrid?q=1&amp;action=addData&amp;userCookie=&lt;%= encodedCookie%&gt;',
                      caption: 'User Grid',
                      ondblClickRow: function(rowid) {
                         $("#userList").jqGrid('editGridRow',rowid, userEditParam);
                          return;
                      }
                   });
  $("#userList").jqGrid('navGrid',"#pager1",{add:true,edit:true,del:true});
  $("#userList").jqGrid('gridResize', { minWidth: 450, minHeight: 150});
  </code></pre>
  
  <p>I tried adding following code to reload</p>
  
  <pre><code>$("#userList").jqGrid('setGridParam',{datatype:xml}).trigger('reloadGrid')
  </code></pre>
  
  <p>Can some one help?</p>
  
  <p><strong>Solution which worked for me</strong></p>
  
  <pre><code>$("#userList").jqGrid('navGrid',"#pager1",{add:true,edit:true,del:true,refresh:true,
  
  beforeRefresh: function() {
     $("#userList").jqGrid('setGridParam',{datatype:xml}).trigger('reloadGrid');
  }},
  {
    afterSubmit: processAddEdit,
         closeAfterAdd:true,
         closeAfterEdit:true
  },{
    aftersubmit:processAddEdit,
         closeAfterAdd:true,
         closeAfterEdit:true
  });
  
  function processAddEdit() {
    $("#userList").jqGrid('setGridParam',{datatype:xml}).trigger('reloadGrid');
    return[true,'']; //no error
  }
  </code></pre>