private void DoExportToExcelWithState(object dataSource, string fileName, JQGridState gridState)
        {
            if (!gridState.CurrentPageOnly)
            {
                gridState.QueryString["page"] = "1";
                gridState.QueryString["rows"] = "1000000";
            }
            IQueryable dataSource2;

            this.FilterDataSource(dataSource, gridState.QueryString, out dataSource2);
            this.ExportToExcel(dataSource2, fileName);
        }
 public void ExportToExcel(object dataSource, string fileName, JQGridState gridState)
 {
     this.DoExportToExcelWithState(dataSource, fileName, gridState);
 }
 public void ExportToExcel(object dataSource, JQGridState gridState)
 {
     this.DoExportToExcelWithState(dataSource, "GridExcelExport.xls", gridState);
 }