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

[Solved] Page setup in export to pdf

2 Answers 176 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 01 Apr 2009, 08:40 AM
Hi All

I have a rad grid with data.

I have a button (Export To PDF)

While clicking the button, a pdf file opens with the data.

The pdf is in portrait mode

Is there any option to change it to landscape mode.

-Anto

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 01 Apr 2009, 09:47 AM
Hello Anto,

You can try out the following code to get a lanscsape orientation on exporting RadGrid to pdf.

CS:
protected void Button1_Click(object sender, EventArgs e) 
    RadGrid1.ExportSettings.ExportOnlyData = true
    RadGrid1.ExportSettings.OpenInNewWindow = true
    RadGrid1.ExportSettings.IgnorePaging = true
    // to get landscape orientation set PageHeight and PageWidth 
    RadGrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("162mm"); 
    RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("600mm"); 
    RadGrid1.MasterTableView.ExportToPdf();  

Please go through the following forum link,
Formatting the Grid export to PDF

Thanks,
Shinu.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 01 Apr 2009, 10:50 AM
Thanks Shinu

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