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

Need Pop up while fetching Data To Pdf

2 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Anto (DLL Version : 2008.3.1314.35) asked on 17 Mar 2009, 08:35 AM
Hi All

I have created a grid

I have fetched the values from a table.

I have kept Three buttons (Export To Excel) (Export To Word) and (Export To Pdf)



While clicking the (Export To Excel) and(Export To Word) button I get a popup "File Download" "Do you want to save it or open with?"

But while clicking (Export To Pdf) Button this pop up does not appear. I want it to appear.

Here is my Coding for the three buttons


//This is for the (Export To Excel)
protected
void btnExcel_Click(object sender, EventArgs e)

{
ConfigureExport();
rgvReport.ExportSettings.FileName =
"HourlyReport";

rgvReport.MasterTableView.ExportToExcel();
}


//This is for the (Export To Word)
protected void btnWord_Click(object sender, EventArgs e)

{
ConfigureExport();
rgvReport.ExportSettings.FileName =
"HourlyReport";

rgvReport.MasterTableView.ExportToWord();
}
//This is for the (Export To Pdf
protected
void btnPdf_Click(object sender, EventArgs e)

{
ConfigureExport();
CheckBox1.Checked =
true;

rgvReport.ExportSettings.FileName =
"HourlyReport";

rgvReport.ExportSettings.ExportOnlyData =
true;

rgvReport.MasterTableView.ExportToPdf();
}

//This function is just for the status
public
void ConfigureExport()

{
rgvReport.ExportSettings.ExportOnlyData = CheckBox1.Checked;
rgvReport.ExportSettings.IgnorePaging = CheckBox2.Checked;
rgvReport.ExportSettings.OpenInNewWindow = CheckBox3.Checked;
}

Advance Thank You

Regards,
Anto

2 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 17 Mar 2009, 10:40 AM
Hello Anto,

Try the following approach:
<telerik:RadGrid ID="RadGrid1" ...> 
   <ExportSettings OpenInNewWindow="true" /> 

Regards,
Daniel
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 17 Mar 2009, 11:51 AM
Hi Daniel

Thank you very much.Problem Solved

-Anto
Tags
Grid
Asked by
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Answers by
Daniel
Telerik team
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Share this question
or