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

I need export radgrid to pdf with custom header and tile

3 Answers 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Reinier
Top achievements
Rank 1
Reinier asked on 01 Jul 2014, 02:39 PM
Hi, I need to export radgrid to pdf format, but a need to put to raddocument my custom title and other header with specific information. Fro example

                                                                                               Title of my Document

           Something                                  Something                                Something                                    Something                            Something

and then the radgrid information

Column1 Column2  Column3  Column4  Column5  Column6  Column7  Column8  Column9  Column10  Column11  Column12  Column13  Column14  Column15 

3 Answers, 1 is accepted

Sort by
0
Accepted
Petya
Telerik team
answered on 03 Jul 2014, 01:23 PM
Hello Reinier,

You can add any content you want to the document containing the exported RadGridView. For example, you can place the wanted information prior the first block in the document.
RadDocument document = CreateDocument(grid, settings);

Paragraph p = new Paragraph() { TextAlignment = RadTextAlignment.Center };
p.Inlines.Add(new Span("Title of my Document"));
document.Sections.First.Blocks.AddBefore(document.Sections.First.Blocks.First, p);

If you want the information to be visible on each page you can put it in the header of the section by creating a separate RadDocument and assigning it as Body of the header.

I hope this helps. Let us know if you have any additional comments or questions.

Regards,
Petya
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Reinier
Top achievements
Rank 1
answered on 26 Jul 2014, 11:43 PM
Hi Petya, thanks for you fast answer, I have other problem I need export one raddocument to pdf file, I do this but when I change the font family of raddocument the pdf file don't have the same font family always is the same font for pdf. I can export the raddocument font family to the pdf file.
Thanks
0
Petya
Telerik team
answered on 30 Jul 2014, 03:59 PM
Hi Reinier,

Like I said in the other thread you started on the matter, this is most likely related to a Silverlight runtime limitation which prevents the embedding of fonts in a document. You could try using the assemblies from the Telerik UI for WPF suite to export the document to PDF and you should not experience such behavior.

Regards,
Petya
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Reinier
Top achievements
Rank 1
Answers by
Petya
Telerik team
Reinier
Top achievements
Rank 1
Share this question
or