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

Export div with RadClientExportManager with a RadGrid

4 Answers 19 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 18 Oct 2018, 07:16 PM

I'm able to export a div to PDF using the RadClientExportManager, but inside this div is a RadGrid that has paging.

How do I disable paging for this grid when exporting? I would also like to know how to remove elements before exporting.

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Oct 2018, 12:43 PM
Hello Eric,

The following example show a way to disable paging so you can export on the client: https://www.telerik.com/support/code-library/page-for-client-side-export. Note that if you have many rows, this will be slow and expensive.

To change the appearance of elements for the export operation, cascade CSS rules through the k-pdf-export class as shown in this article: https://docs.telerik.com/devtools/aspnet-ajax/controls/clientexportmanager/how-to/change-the-exported-content-before-export.

You can also collect several elements into a single export operation as shown here (they will have to be on separate pages, however): https://www.telerik.com/support/code-library/export-multiple-elements-from-the-page-at-once.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Dean
Top achievements
Rank 1
answered on 19 Oct 2018, 05:52 PM

Thanks for the links!

I'm currently focusing on disabling paging first. I'm having trouble as I am trying to use a RadAjaxManagerProxy, so I found this link to help me: https://www.telerik.com/blogs/handling-onajaxrequest-in-content-pages-with-ajax-proxy

 

I've set up my code in a similar fashion to the first link you sent me and also the link that I put up, but it doesn't seem to be doing anything. Any ideas?

0
Dean
Top achievements
Rank 1
answered on 19 Oct 2018, 08:28 PM
Got it mostly working now. Just having a problem where it exports my PDF but only takes out the paging controls, it's still missing all the other controls.
0
Accepted
Marin Bratanov
Telerik team
answered on 22 Oct 2018, 10:29 AM
Hi Eric,

I would recommend comparing the code you currently have with the code in the code library sample to see what's the difference causing the issue. For one, it may be that you are using an old version of the Telerik controls that has issues, especially under the current browsers. Also, in R3 2018 we upgraded the underlying Kendo scripts that power the client-side export and so things should work better in the latest release.

Last, but not least, please make sure there are no script errors and that the page markup is valid.

If neither of these helps you get the current rendered page exported, I advise that you isolate this in an MCVE (https://stackoverflow.com/help/mcve) and open a support ticket where you can send it to us so we can take a look.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Dean
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Dean
Top achievements
Rank 1
Share this question
or