I have several grids that need to be exported to pdf and all would have the same style, color, font, etc...I just don't want to define style in each grid's itemcreated event...
Is there any way that I could centrally define it which would then be available to all exports???
Thanks
Is there any way that I could centrally define it which would then be available to all exports???
Thanks
4 Answers, 1 is accepted
0

Neetu
Top achievements
Rank 1
answered on 19 Mar 2011, 07:52 PM
Is there no solution???
0
Hello Neetu,
PDF export supports inline styles only. There is no easy way to avoid the usage of programmatic approach except if your data resides in template columns:
Starting from the next version of RadGrid you will be able to set default font when exporting to PDF format either in code-behind or declaratively via ExportSettings.
Regards,
Daniel
the Telerik team
PDF export supports inline styles only. There is no easy way to avoid the usage of programmatic approach except if your data resides in template columns:
...
<
ItemTemplate
>
<
span
style
=
"color: #ff00aa; font-size: 14pt; padding-top: 20px"
>Text 1</
span
>
<
div
style
=
"color: #448f55; font-size: 8pt;"
>
<
div
>
<
u
>Line 1</
u
>
</
div
>
<
div
>
<
i
>Line 2</
i
>
</
div
>
</
div
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
Starting from the next version of RadGrid you will be able to set default font when exporting to PDF format either in code-behind or declaratively via ExportSettings.
Regards,
Daniel
the Telerik team
0

Neetu
Top achievements
Rank 1
answered on 28 Mar 2011, 05:42 PM
Thanks for the response. I just saw that a new version just came out. Does this new version support default font while exporting to pdf?
0
Accepted
Hello Neetu,
DefaultFontFamily property will be available in RadControls for ASP.NET AJAX Q1 2011 SP1. You can also test it with our latest internal builds:
Latest Internal Builds
Regards,
Daniel
the Telerik team
DefaultFontFamily property will be available in RadControls for ASP.NET AJAX Q1 2011 SP1. You can also test it with our latest internal builds:
Latest Internal Builds
Regards,
Daniel
the Telerik team