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
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.
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?
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.