My application uses UltraWebGridExcelExporter to export the ultrawebgrid to excel.
But I have to export first 500 records from the data source where as the ulrawebgrid just displays first 25 records due to pagination.
So only 25 records are exported by UltraWebGridExcelExporter to excel.
Is there any way to export 500 records to excel using UltraWebGridExcelExporter or is there any other approach to export to excel?
Your help is greatly appreciated.
Thanks,
Praba
Hi,
You can do something like below code in your download click event
Here is sample code for your reference
protected void downloadLinkButton_Click(object sender, System.EventArgs e) { this.locationsUltraWebGrid.DisplayLayout.Pager.AllowPaging = false; this.locationsUltraWebGrid.DataBind(); //Export the data this.UltraWebGridExcelExporter1.Export(locationsUltraWebGrid); this.UltraWebGridExcelExporter1.DownloadName = "Locations"; //Turn it back on this.locationsUltraWebGrid.DisplayLayout.Pager.AllowPaging = true; this.locationsUltraWebGrid.DataBind(); }
Hope this helps
Did you get this to work?
My UltraWebGridExcelExporter blows up when I call the Export method; I get:
Microsoft.JScript runtime error:
Sys.WebForms.PageRequestManagerParseErrorException: The message received from the server could not be parsed.
Does this have to do with recent updates by MS (Late December) about the size of JSON calls?