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

How to include image inside the header & footer template for a grid when exporting to PDF and Excel.

2 Answers 835 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yanesh
Top achievements
Rank 1
Yanesh asked on 15 Sep 2017, 09:59 AM

How to include image inside header & footer template for a grid when exporting to PDF and Excel.

The Image should only be displayed in the exported files and not in the webpage.
How to implement this in both JavaScript and ASP MVC?

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 19 Sep 2017, 05:44 AM
Hello Yanesh,

Regarding the requirements:

1) An image can be added only to the exported PDF using the pdf.template option of the Kendo UI Grid PDF export:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-pdf.template

MVC demo with external template:

http://demos.telerik.com/aspnet-mvc/grid/pdf-export

Please have in mind that the PDF export module might not be able to export images hosted on a different domain. See Known Limitations:

http://docs.telerik.com/kendo-ui/framework/drawing/drawing-dom#known-limitations

Setting up permissive Cross-Origin HTTP headers should help in this case:

https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image

2) Currently, the Excel export will be based only on the data in the Grid dataSource.  I can suggest voting for a similar feature in our feedback portal as this will increase its changes to be implemented sooner:

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/11603982-excel-export-with-image-for-grid

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Yanesh
Top achievements
Rank 1
answered on 26 Sep 2017, 12:29 PM
Thanks Stefan. This was  helpful.
Tags
Grid
Asked by
Yanesh
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Yanesh
Top achievements
Rank 1
Share this question
or