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

How to include filter options in the header template for a grid when exporting to PDF

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yanesh
Top achievements
Rank 1
Yanesh asked on 26 Sep 2017, 12:37 PM

How to include filter options in the header template for a grid when exporting to PDF. For example, if user has filtered a grid column by say username = 'John', I need to change the header template to contain the text 'Sorted by username: John' in the PDF header.

The filter options should only be displayed in the exported files and not in the webpage. Can it be implemented in both - JavaScript and asp.net?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 Sep 2017, 08:23 AM
Hello, Yanesh,

Currently, the Kendo UI Grid PDF export can access only the page and the total number of pages in the template. It can receive a custom value instead of the built-in ones, but the value which is passed will overwrite the built-in ones.

I made an example demonstrating how to access the filter value on the filter event and then change the template with the filter value before exporting:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-filter

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-pdfExport

I hope this is helpful.

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.
Tags
Grid
Asked by
Yanesh
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or