This is a migrated thread and some comments may be shown as answers.

ExportToExcel ... need a means to let user I am working...

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marlon Santos
Top achievements
Rank 1
Marlon Santos asked on 15 Dec 2011, 03:52 PM
1. I have a dynamically (code behind) created grid.
2. The user clicks a button (they do not see a grid on the page.. ) to create a report.
3. Code behind dynamically creates the grid and binds it to a datasource (need datasource).
4. Then the code configures the dynamic grid for exporting to excel...
5.  Then we call the ExportToExcel() function.

what I need is a on screen display letting them know to wait while I load their records into excel...  It seems the exportToExcel kills (response.end??) the page processing..

Example code...
RadGrid grid = new RadGrid();
       grid.NeedDataSource += new GridNeedDataSourceEventHandler(grid_NeedDataSource);
       grid.ID = "RadGrid" + counter.ToString();
 
       grid.AllowSorting = true;
 
       grid.ExportSettings.ExportOnlyData = true;
       grid.ExportSettings.IgnorePaging = true;
       grid.ExportSettings.OpenInNewWindow = true;
       Page.Controls.Add(grid);
       grid.MasterTableView.ExportToExcel();
       lblMessage.Text= "please wait.. i am creating your excel workbook...";

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Dec 2011, 07:24 AM
Hello,

I have tried the same and it worked as expected. Also if you have ajaxified the grid, take a look into the following documentation.
Export from Ajaxified Grid

Thanks,
Princy.
Tags
Grid
Asked by
Marlon Santos
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or