title: Passing extra parameters to ASP.NET MVC controller action from jQuery Grid plugin
body: <p>I am trying to use jQuery Grid plugin with ASP.NET MVC to display data. It seems examples provided on the web shows that the controller action signature looks like this:</p>
  
  <pre><code>public ActionResult SomeMethod(string sidx, string sord, int page, int rows) { }
  </code></pre>
  
  <p>Is there any way I can pass extra parameters from various input fields on the page?</p>
  
  <p>Cheers,
  D.</p>
  
  <p>ADDED: I have not written any code yet but the client side code will be something like:</p>
  
  <pre><code>jQuery(document).ready(function(){ 
        jQuery("#list").jqGrid({
          url:'/Entry/GridData/',
          datatype: 'json',
          mtype: 'POST',
          colNames:['Entry Date','Registration','Registered Name'],
          colModel :[
            {name:'EntryDate', index:'EntryDate', width:40 },
            {name:'Registration', index:'Registration', width:200 },
            {name:'RegisteredName', index:'RegisteredName', width:200 }],
          pager: jQuery('#pager'),
          rowNum:20,
          rowList:[5,10,20,50],
          altRows: true,
          sortable: false,
          viewrecords: true,
          caption: 'My first grid'
        }); 
      });
  </code></pre>
  
  <p>And the server side code something like:</p>
  
  <pre><code>public ActionResult GridData(string sidx, string sord, int page, int rows)
  {
      //Some stuff to get data, which needs a couple of extra parameters on top of the ones in the signature
      return Json(dataCollection);
  }
  </code></pre>
  
  <p>In the GridData action I need a couple more parameters to get the appropriate data. How do I specify these in the javascript, and how do I get hold of them in the controller action?</p>