title: How to pass JqGrid data source (with applied filters) to MVC controller
body: <p>I have defined the following button in jqgrid. I have looked up alot of posts regarding this but still cant figure out how to send the data source to controller (not the filters).</p>
  
  <p>I need to somehow get the datasource as a collection in the controller </p>
  
  <pre><code>$("#btnExportCsv").click(function () {
              $.blockUI({ css: {
                  border: 'none',
                  padding: '15px',
                  backgroundColor: '#000',
                  '-webkit-border-radius': '10px',
                  '-moz-border-radius': '10px',
                  color: '#fff'
              }, message: '&lt;h1&gt;Exporting to CSV&lt;/h1&gt;&lt;p&gt;&lt;img src="/cms/themes/cm-blue/img/busy.gif" /&gt;&lt;/p&gt;'
              });
  
              generating = true;
  
              $.ajax({
                  type: 'POST',
                  dataType: 'json',
                  url: exportCsvUrl,
                  error: function (XMLHttpRequest, textStatus, errorThrown) {
                      $.jGrowl(XMLHttpRequest.responseText, { header: 'Error exporting csv' });
                      generating = false;
                  },
                  complete: function () {
                      $.unblockUI();
                  },
                  success: function () {
                      growl("Export completed successfully", "Export to Csv");
                  }
              });
  
          });
  </code></pre>
  
  <hr>
  
  <p>jQGrid params:</p>
  
  <pre><code>$("#myGrid").jqGrid({
          colNames: [
      .
      .
      .  
          ],
          colModel: [...]
      mtype: 'POST',
          datatype: 'json',
          pager: '#crPager',
          page: defaultGridParams.Page,
          sortname: defaultGridParams.SortName,
          sortorder: defaultGridParams.SortOrder,
          rowNum: 10,
          rowList: [10, 20, 50, 100],
          url: Controllers/control,
          height: 'auto',
          loadui: 'block',
          width: 1200,
          caption: sGridCaption,
          hidegrid: false,
          viewrecords: true,
          ShrinkToFit: false,
  </code></pre>