title: jqGrid postdata sends null values (mvc3 asp/net)
body: <p>jqGrid doesn't send postdata to my controller. I tried all provided solutions on stackoverflow, buy apparently I'm making error(s) somewhere. So here is the code:</p>
  
  <pre>
  
       function refreshGrid() {
          alert('CompanyNamePart=' + $("#CompanyNamePart").val()); // to check if this is correct value
          $("#list").trigger('reloadGrid');
          return false;
      }
  
      $(function () {
          var grid = jQuery("#list").jqGrid({
              datatype: 'json',
              caption: 'Transaction Log',
              postdata: {
                  CompanyNamePart: function () { return $("#CompanyNamePart").val(); },
                  UsernamePart: function () { return $("#UsernamePart").val(); },
              },
              url: '@Url.Action("GetTransactionLogData")',
              mtype: 'GET',
              colNames: ['Ref.', 'TradeDate', 'Status'],
              colModel: [
                  { name: 'Reference', index: 'Reference', width: '60' },
                  { name: 'TradeDate', index: 'TradeDate', width: '70' },
                  { name: 'Status', index: 'Status', width: '80' }
              ],
              pager: $('#pager'),
              rowNum: 10,
              height: '100%'
          });
      });
  
  <br />
  
  
  </pre>
  
  <p>On Controller side I have simple code:</p>
  
  <pre>
  [HttpGet]
          public ActionResult GetTransactionLogData(string sidx, string sord, int page, int rows,  string CompanyNamePart, string UsernamePart)
          { return Json(null); }
  </pre>
  
  <p>and in Debugging mode when I call refreshGrid() by clicking a button I get one alert to confirm me that it reads correctly value of textfield, and after that it refreshes the grid. I receive call of controller, but values for CompanyNamePart and UsernamePart variables are all null, even though I filled them. </p>
  
  <p>I tried another solution for postdata section with another approach, first I created functions that return needed values and put them in postdata section of grid:</p>
  
  <pre>
      function getCompanyNamePartVal() {
          return $("#CompanyNamePart").val();
      }
  
      function getUsernamePartVal() {
          return $("#UsernamePart").val();
      }
  
  ... in jqgrid definition
      postdata: {
                  CompanyNamePart: getCompanyNamePartVal(),
                  UsernamePart: getUsernamePartVal(),
              },
  </pre>
  
  <p>but with no success.</p>
  
  <p>When I checked Firebug, I could see that jqGrid is not sending postdata values:</p>
  
  <pre>
  <b>Get Parameters caught by Firebug</b>
  _   1340696638960
  _search false
  nd  1340696638955
  page    1
  rows    10
  sidx    
  sord    asc
  </pre>
  
  <p>What am I doing wrong?</p>