Export PDF

Posted by: ntd119 on 15 April 2020, 11:40 pm EST

  • Posted 15 April 2020, 11:40 pm EST

    Hi

    I have a demo at the link https://stackblitz.com/edit/react-ubqo1y

    I have some problems exporting PDF, can you help me?

    1. In PDF, the Country column should have the background.
    2. In PDF, the Sales column should have the text color.
    3. In PDF, if the cells have value {EMPTY} or {NULL} then the value in PDF will be blank

      Thanks
  • Posted 16 April 2020, 2:31 am EST

    Hi,

    While exporting the FlexGrid to PDF, you will also need to format the PDF accordingly using the formatItem callback provided with the export method. Please refer to the updated sample link below:

    https://stackblitz.com/edit/react-dehhrq

    Regards,

    Ashwin

  • Posted 16 April 2020, 4:51 am EST

    Thanks for your respond

    I have another problem

    I have a demo at the link https://stackblitz.com/edit/react-ubqo1y

    When I collapse the country column, the PDF has no records.

    I want all records to be displayed in PDF when I collapse the country column.

    Please help me

    Thanks

  • Posted 17 April 2020, 12:38 am EST

    Hi,

    The cause of the issue is the same as for the paging. Since, the PDF is created according to the FlexGrid and not the underlying and since the collapsed rows and not visible, that is why the PDF does not have the collapsed row.

    To resolve this issue, save the collapsed state and expand each grouped row before exporting and set the collapsed state again after exporting.

    https://stackblitz.com/edit/react-rp6xnc

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels