title: About the JqGrid process events
body: <p>Just want to better understand about <code>JqGrid</code> event process</p>
  
  <ul>
  <li>beforeRequest </li>
  <li>loadBeforeSend  </li>
  <li>serializeGridData  </li>
  <li>loadError </li>
  <li>gridComplete</li>
  <li>loadComplete</li>
  </ul>
  
  <p>Based on this events</p>
  
  <ul>
  <li>If I want to add filter or extra parameters in on the <code>ajax</code> request to the server, I should do it in the <strong>loadBeforeSend</strong> right?</li>
  <li>After I get the data from server, if I want to prevent the data from showing up in the grid (i want to further process it first, and only display the processed data afterwards), I should do it in the <strong>gridComplete</strong> right?</li>
  </ul>
  
  <p>Because my work requires me to add extra parameters when sending request to the server, and after receiving the data, I need to stop the grid from displaying the data on the grid so that I can process the data further, before displaying the processed data on the grid. But I couldn't seem to grasp which event that JqGrid has should I put my function to.</p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>For the postData part</p>
  
  <pre><code>loadBeforeSend: function() {
      if (sessionStorage.pathStates == "edit" &amp;&amp; location.pathname.indexOf("list") &gt; -1) {
          console.log("SUCCESS");
          loadFilter();
      }
  },
  </code></pre>
  
  <p>And the loadFilter</p>
  
  <pre><code>function loadFilter() {
      var filter = JSON.parse(sessionStorage.filter);
      var filterInput = [],
          model = [],
          filters = {};
      filterInput = filter.filterInput;
      model = filter.model;
      var grid = filter.grid,
          page = filter.page,
          op = "bw",
          a = 0,
          b = 0;
  
      filters = {
          groupOp: "AND",
          rules: []
      };
  
      for (var i = 0; i &lt; model.length; i++) {
          if (filterInput[a].length &gt; 0) {
              filters.rules.push({
                  field: model[a],
                  op: "bw",
                  data: filterInput[a]
              });
          }
          a++;
      }
  
      $(grid).jqGrid('setGridParam', {
          search: true,
          postData: {
              filters: JSON.stringify(filters)
          }
      }).trigger('reloadGrid');
  }
  </code></pre>
  
  <p>As for beforeProcessing, I still have no idea on this one yet. But the process that I had in my mind is something like this</p>
  
  <pre><code>beforeProcessing: function(data) {
       if (sessionStorage.pathStates == "edit" &amp;&amp; location.pathname.indexOf("list") &gt; -1) { &gt;&gt;
           Filter data based on certain criterias, like
           for example, changing one of the column format, or only displaying data that has the value of xxx on certain column &gt;&gt;
               Return the filtered data
       }
   },
  </code></pre>