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

Pdf export styling

4 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Neetu
Top achievements
Rank 1
Neetu asked on 17 Mar 2011, 02:44 PM
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

4 Answers, 1 is accepted

Sort by
0
Neetu
Top achievements
Rank 1
answered on 19 Mar 2011, 07:52 PM
Is there no solution???
0
Daniel
Telerik team
answered on 22 Mar 2011, 12:45 PM
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:
...
    <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
Daniel
Telerik team
answered on 31 Mar 2011, 09:53 PM
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
Tags
Grid
Asked by
Neetu
Top achievements
Rank 1
Answers by
Neetu
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or