Is there any way that you can exclude the toolbars with the export buttons and the message about dragging columns to group, and footer/pager from the PDF when exporting the grid? See the attached PDF screen shot for an example.
Frank Wanicka
Frank Wanicka
4 Answers, 1 is accepted
0
Accepted
Hi,
Not currently, but I just pushed a small new feature that should help. It will be available in the next internal build.
During PDF export, the toplevel DOM element will get the CSS class "k-pdf-export", and thus you can use plain CSS to exclude elements of your choice. For example to exclude the grid toolbar and group header you would add this CSS to your page:
.k-pdf-export .k-grid-toolbar,
.k-pdf-export .k-grouping-header {
display: none;
}
You can use the DOM Inspector to figure out the classes of the elements that you want to exclude.
Again, you will be able to use this feature after downloading the next internal build. We normally release builds on Fridays.
Regards,
Mihai
Telerik
Not currently, but I just pushed a small new feature that should help. It will be available in the next internal build.
During PDF export, the toplevel DOM element will get the CSS class "k-pdf-export", and thus you can use plain CSS to exclude elements of your choice. For example to exclude the grid toolbar and group header you would add this CSS to your page:
.k-pdf-export .k-grid-toolbar,
.k-pdf-export .k-grouping-header {
display: none;
}
You can use the DOM Inspector to figure out the classes of the elements that you want to exclude.
Again, you will be able to use this feature after downloading the next internal build. We normally release builds on Fridays.
Regards,
Mihai
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Frank
Top achievements
Rank 1
answered on 20 Nov 2014, 04:34 PM
Excellent. Thanks very much.
0
William
Top achievements
Rank 1
answered on 27 Feb 2016, 03:10 PM
That works great but I can't seem to get the footer to go away. Here is what I have:
<style>
.k-pdf-export .k-grid-toolbar, .k-pdf-export .k-grid-footer,
.k-pdf-export .k-grouping-header {
display: none;
}
</style>
0
Hi,
Use .k-pdf-export .k-grid-pager to target the footer element in PDF.
Regards,
Mihai
Telerik
Use .k-pdf-export .k-grid-pager to target the footer element in PDF.
Regards,
Mihai
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!