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

[Solved] Refresh grid after export to excel

3 Answers 293 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Olo
Top achievements
Rank 1
Olo asked on 15 Jan 2009, 07:50 AM
Hello,
How can I refresh grid after export to excel?
I have a normal export button and ajaxified grid.
 grid.CurrentPageIndex = 0; 
        grid.ExportSettings.ExportOnlyData = true
        grid.ExportSettings.IgnorePaging = true
        grid.ExportSettings.OpenInNewWindow = true
        grid.ExportSettings.FileName = "Export"
        grid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML; 
        grid.MasterTableView.ExportToExcel(); 

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Jan 2009, 08:08 AM
Hi,

Try rebinding the Grid after exporting the Grid in the click event of the export button.

CS:
 
grid.CurrentPageIndex = 0;  
        grid.ExportSettings.ExportOnlyData = true;  
        grid.ExportSettings.IgnorePaging = true;  
        grid.ExportSettings.OpenInNewWindow = true;  
        grid.ExportSettings.FileName = "Export";  
        grid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML;  
        grid.MasterTableView.ExportToExcel();  
       grid.MasterTableView.Rebind(); 

Shinu
0
Olo
Top achievements
Rank 1
answered on 15 Jan 2009, 11:16 AM
Still not working.
0
mgl mgl
Top achievements
Rank 1
answered on 10 Nov 2009, 01:40 PM
Have you found a solution for this? I am having the same problem.
Tags
Grid
Asked by
Olo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Olo
Top achievements
Rank 1
mgl mgl
Top achievements
Rank 1
Share this question
or