Export div with RadClientExportManager with a RadGrid

5 posts, 1 answers
  1. Dean
    Dean avatar
    13 posts
    Member since:
    Oct 2018

    Posted 18 Oct 2018 Link to this post

    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.

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5809 posts

    Posted 19 Oct 2018 Link to this post

    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.
  3. Dean
    Dean avatar
    13 posts
    Member since:
    Oct 2018

    Posted 19 Oct 2018 Link to this post

    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?

  4. Dean
    Dean avatar
    13 posts
    Member since:
    Oct 2018

    Posted 19 Oct 2018 in reply to Dean Link to this post

    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.
  5. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    5809 posts

    Posted 22 Oct 2018 Link to this post

    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.
Back to Top