title: jqGrid reloadGrid not working when last record is removed
body: <p>I have a jqGrid on my page that receives its records using a json post to the server.  On the same page, I also have a delete button.  Clicking the delete button uses an ajax post to the server to delete the selected record.  After deleting the record, if the server returns a success code, I need the grid to refresh.</p>
  
  <p>It seems to be working fine except when there is only one record in the grid.  The last record I delete is never removed from the grid.  Even if i press the refresh button on the footer it still won't go away.  When there is more than one record it refreshes as I would expect it to.</p>
  
  <p>I am new to jqGrid so I am sure I am doing something wrong.  Any help would be appreciated.</p>
  
  <p>jqGrid definition</p>
  
  <pre><code>    $('#gridOrgs').jqGrid({
          url: 'some url goes here',
          datatype: 'json',
          mtype: 'POST',
          loadonce:false,
          colNames: ['ID', 'Name', 'City', 'Province', 'Admin'],
          colModel: [
              { name: 'Id', index: 'Id', hidedlg: true, hidden: true, sortable: false },
              { name: 'CompanyName', index: 'CompanyName', width: 200, sorttype: 'text' },
              { name: 'City', index: 'City', width: 150, sorttype: 'text' },
              { name: 'Province', index: 'Province', width: 150, sorttype: 'text' },
              { name: 'IsAdmin', index: 'IsAdmin', width: 50, sorttype: 'text', formatter: 'checkbox', align: 'center'},
              ],
          pager: '#pagerOrgs',
          jsonReader: {
              repeatitems: false,
              id: 'Id' },
          rowNum: 10,
          rowList: [10, 25, 50, 75, 100],
          sortname: 'CompanyName',
          sortorder: 'desc',
          viewrecords: true,
          caption: 'Companies',
          hidegrid: false,
          width: 650,
          height: 400,
          onSelectRow: function (id) {
                  if (id)
                      RowSelected(id, $('#gridOrgs').getCell(id,'IsAdmin'));
                  else
                      NoRowSelected();
              }
      });
      jQuery("#gridOrgs").jqGrid('navGrid','#pagerOrgs',{edit:false,add:false,del:false});
  </code></pre>
  
  <p>Delete button click event:</p>
  
  <pre><code>    $('#btnDelete').click(function() {
          var id = jQuery("#gridOrgs").jqGrid('getGridParam','selrow');
  
          if (id)
             $.post('@Url.Action("Json_Delete", "Organization")', {'id': id}, function(data){ProcessDeleteResponse(data.result);}, 'json');
          else
              $('#dialogNothingSelected').dialog('open');
      });
  
      function ProcessDeleteResponse(resultCode) {
          if (resultCode == 'success')
              $('#gridOrgs').trigger('reloadGrid'); 
      }
  </code></pre>
  
  <p>I have also tried</p>
  
  <p>.trigger('reloadGrid', [{page:1}]);</p>
  
  <p>.trigger('reloadGrid', [{current:true}]);</p>
  
  <p>No matter what I do, the last record stays in the grid.</p>
  
  <p>One last thing: When I trigger reloadGrid, the grid DOES make a call to the server and receives the updated information.  The updated information contains 0 for the total number of records.</p>
  
  <p>Thanks Again.</p>