title: Unable to reload JQGrid with new json data
body: <p>I am unable to reload JQGrid with new json data, which is received from a controller. In the code shown below, I display an alert after successfully  receiving data and also passing it to another method. However I am unable to refresh the data. Any suggestions on how to resolve this issue?</p>
  
  <p>Code:-</p>
  
  <pre><code>$.ajax({
      type: 'post',
      url: '/TodoList/searchdata',
      traditional: true,
      dataType:"json",
      data: d,
      success: function (data) {
          alert(JSON.stringify(data));                 
          callme(data);
      }
  })
  </code></pre>
  
  <h2>call me function:-</h2>
  
  <pre><code>function callme(newone1) {
      $grid.jqGrid('clearGridData');
      $grid.jqGrid({
          //autowidth: true,
          caption: "Evaluated URLs",
          colNames: ["AccountName", "BU", "Salesop", "Isdormant"],
          colModel: [
              { name: "AccountName", align: "center", title: false, width: 400, resizable: false, sortable: false },
              { name: "BU", width: 125 },
              { name: "Salesop", align: "center", width: 125, sorttype: "date" },
              { name: "Isdormant", align: "center", width: 125, sorttype: "date" }
          ],
          data: newone1,
          datatype: 'json',
          emptyrecords: "0 records found",
          multiselect: true,
          localReader: {
              page: function (obj) {
                  return (obj.page === 0 || obj.page === undefined) ? "0" : obj.page;
              }
          },
          loadComplete: function () {
              var ts = this;
              if (ts.p.reccount === 0) {
                  $(this).hide();
                  emptyMsgDiv.show();
              } else {
                  $(this).show();
                  emptyMsgDiv.hide();
              }
          },
          height: "auto",
          sortname: "created",
          toppager: true,
          pager: "#url-pager",
          viewrecords: true
      }).trigger("reloadGrid");
      //$grid.jqGrid('setGridParam',
      //{    
      //    datatype: 'json',
      //    data: newone1
      //}).trigger("reloadGrid",[{page:1}]);
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hlyBC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hlyBC.png" alt="Json data received is showing in an alert"></a></p>