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

Export to Excel from modal window

4 Answers 378 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 19 Oct 2010, 10:36 AM
Dear Sirs!
I have the the RadGrid inside modal dialog window (I open it when calling the showModalDialog from javascript).
I want to export the data in this grid to Excel. For this:
1. I did the button and code behind window I write:
2. dgv.ExportSettings.IgnorePaging = true;

    dgv.MasterTableView.ExportToExcel();

 


When clicking on tgeh button NOTHING happen.

Of course this works OK when working with the grid in regular page, not modal window

I want to know:
If there is any possibility to use exporting in Excel inside modal dialog?

Thank you very much in advance.

Boris

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Oct 2010, 12:15 PM
Hello Boris,


Did you invoke ExportToExcel() method to export the grid values to excel file?

Code:
protected void Button1_Click(object sender, EventArgs e)
{
    RadGrid1.ExportSettings.IgnorePaging = true;
    RadGrid1.ExportSettings.OpenInNewWindow = true;
    RadGrid1.MasterTableView.ExportToExcel();
}
Exporting grid - Overview
Word/Excel export (HTML-based)


-Shinu.
0
Boris
Top achievements
Rank 1
answered on 19 Oct 2010, 12:21 PM
Hello Shinu,

Yes I wrote just the same code that you supposed.

Boris
0
Daniel
Telerik team
answered on 19 Oct 2010, 03:17 PM
Hello Boris,

I already answered to your support ticket. In short, my suggestion is to avoid using the modal dialog as it is browser-dependent feature. I recommend that you use RadWindow instead - this way you will have better appearance and cross-browser compatibility.

Regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Boris
Top achievements
Rank 1
answered on 19 Oct 2010, 03:54 PM
Hello Shinu,
I understood, I changed my project to RadWindow, it works OK currently.
Only small disadvantage - it works bit slower than modal dialog.

Tags
Grid
Asked by
Boris
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Boris
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or