Hello,
I am trying to export a RadGrid to PDF. However, the text overlaps. I have used your RadGrid Export tips and tricks to resize the item cell but still the columns are more and therefore I need to export the grid to the pdf as a landscape. Please let me know how this can be achieved. Thank you.
I am trying to export a RadGrid to PDF. However, the text overlaps. I have used your RadGrid Export tips and tricks to resize the item cell but still the columns are more and therefore I need to export the grid to the pdf as a landscape. Please let me know how this can be achieved. Thank you.
4 Answers, 1 is accepted
0
Accepted

Princy
Top achievements
Rank 2
answered on 18 Dec 2008, 04:17 AM
Hello Parveeza,
You can try out the following code to get a lanscsape orientation on exporting your grid to pdf.
cs:
You can also go through the following forum link
Formatting the Grid export to PDF
Thanks
Princy.
You can try out the following code to get a lanscsape orientation on exporting your grid 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 lanscape orientation |
RadGrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("162mm"); |
RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("600mm"); |
RadGrid1.MasterTableView.ExportToPdf(); |
} |
You can also go through the following forum link
Formatting the Grid export to PDF
Thanks
Princy.
0

Parveeza
Top achievements
Rank 1
answered on 19 Dec 2008, 06:41 PM
Thank you. That worked out really well.
Parveeza
Parveeza
0

Nicolaï
Top achievements
Rank 2
answered on 21 May 2010, 12:13 PM
Is it different with VB?
Using those dimensions looks more like a banner size than landscape...
No, the mentionned sizes cannot be standard:
http://www.cl.cam.ac.uk/~mgk25/iso-paper.html
A4 is: If orientationRBL.SelectedItem.Text = "Portrait" Then
radgrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("210mm")
radgrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("297mm")
Else
radgrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("297mm")
radgrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("210mm")
End If
Using those dimensions looks more like a banner size than landscape...
No, the mentionned sizes cannot be standard:
http://www.cl.cam.ac.uk/~mgk25/iso-paper.html
A4 is: If orientationRBL.SelectedItem.Text = "Portrait" Then
radgrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("210mm")
radgrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("297mm")
Else
radgrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("297mm")
radgrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("210mm")
End If
A Series Formats | B Series Formats | C Series Formats | |||
---|---|---|---|---|---|
4A0 | 1682 × 2378 | – | – | – | – |
2A0 | 1189 × 1682 | – | – | – | – |
A0 | 841 × 1189 | B0 | 1000 × 1414 | C0 | 917 × 1297 |
A1 | 594 × 841 | B1 | 707 × 1000 | C1 | 648 × 917 |
A2 | 420 × 594 | B2 | 500 × 707 | C2 | 458 × 648 |
A3 | 297 × 420 | B3 | 353 × 500 | C3 | 324 × 458 |
A4 | 210 × 297 | B4 | 250 × 353 | C4 | 229 × 324 |
A5 | 148 × 210 | B5 | 176 × 250 | C5 | 162 × 229 |
A6 | 105 × 148 | B6 | 125 × 176 | C6 | 114 × 162 |
A7 | 74 × 105 | B7 | 88 × 125 | C7 | 81 × 114 |
A8 | 52 × 74 | B8 | 62 × 88 | C8 | 57 × 81 |
A9 | 37 × 52 | B9 | 44 × 62 | C9 | 40 × 57 |
A10 | 26 × 37 | B10 | 31 × 44 | C10 | 28 × 40 |
0
Hello Nicolai,
I suppose the dimensions suggested by Princy are just an illustrative example as to how to change the page orientation. You can find a code-snippet for setting a landscape orientation for A4 paper size below:
PDF export help topic
Best 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.
I suppose the dimensions suggested by Princy are just an illustrative example as to how to change the page orientation. You can find a code-snippet for setting a landscape orientation for A4 paper size below:
PDF export help topic
Best 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.