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

RadGrid ExporttoPdf

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saurabh
Top achievements
Rank 1
Saurabh asked on 21 Nov 2014, 07:32 AM
Hi, 

I want to download grid data in Pdf format, on LinkButton click event, for that i used this code. 

protected void ExportToPdf_Click(object sender, EventArgs e)
       {
           RadGrid1.ExportSettings.ExportOnlyData = true;
           RadGrid1.ExportSettings.IgnorePaging = true;
           RadGrid1.ExportSettings.OpenInNewWindow = true;
           RadGrid1.ExportSettings.FileName = "FileName";
           RadGrid1.MasterTableView.ExportToPdf();
       }

But every time i click on the button, my file is downloading in .xls format not in .Pdf.. 

any suggestions? thanks. 

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 25 Nov 2014, 12:15 PM
Hello Saurabh,

I am afraid I am not aware of such issue with RadGrid exporting. I prepared a small sample and used LinkButton which executed the provided code. Could you please give it a try and let me know how it differs from your real setup?

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Saurabh
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or