title: jqgrid - serializeGridData with additional postData params
body: <p>I am trying to use serializeGridData to convert my postdata to JSON using this <a href="https://stackoverflow.com/questions/3161302/jqgrid-page-1-of-x-pager/3161542#3161542">answer</a> from <a href="https://stackoverflow.com/users/315935/oleg">Oleg</a>. Here is my code.</p>
  
  <pre><code>jQuery(function() {
     $('#grid').jqGrid({
         ........
         ........
         postData: {
          param1: function() { return $("param1").val(); },
          param2: function() { return $("param2").val(); },
          searchText: function() { return $("searchText").val(); },
          totalRecords: function() { return msgGrid.getGridParam("records"); }
      },
      serializeGridData: function (postData) {
             return JSON.stringify(postData);
      },
      ajaxGridOptions : {
          contentType: 'application/json; charset=utf-8'
      }
      });
  });
  </code></pre>
  
  <p>postData coming to serializeGridData does not replace the custom params defined in postData {} with actual values. I have debugged in firebug and this is how the data is coming to serializeGridData method. So eventually JSON.stringify is not converting param1, param2.. values in the request data. How can fix it to send the actual values for custom params? Thanks in advance..</p>
  
  <pre><code>_search     false
  nd      1349195468864
  page        1
  rows        25
  sidx        "sortcol_name"
  sord        "desc"
  param1      function()        // expect to have actual param1 value
  param2      function()
  searchText          function()
  totalRecords    function()
  </code></pre>