jQuery UI Widgets Forums Angular Adding content to Print output

This topic contains 2 replies, has 2 voices, and was last updated by  loridale27 2 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Adding content to Print output #120890

    loridale27
    Participant

    I am printing from a jqxDataGrid in various formats, but specifically when printing to PDF, is there a way to add additional content to the document, like a header or title? And is there a way to customize the name of the output file prior to the export so the name would not need to be changed (ie: currently it is exporting as jqxDataTable.pdf and I’d like to change to something more descriptive such as “Members.pdf”).

    Adding content to Print output #120908

    Yavor Dashev
    Participant

    Hi loridale27,

    Unfortunately the jqxDataGrid doesn’t support adding a header or title when its exported.

    For your other question you can use the exportSettings property used by jqxDataTable when exportData is called.
    List of parameters:
    columnsHeader – determines whether to export the column’s header.
    hiddenColumns – determines whether to export the hidden columns.
    serverURL – determines the URL of the save-file.php.
    characterSet – determines the char set.
    recordsInView – determines whether to export all records or to take also the filtering and sorting into account.
    fileName – determines the file’s name. Set this to null if you want to export the data to a local variable.

    Code example
    Set the exportSettings property.

    $(“#dataTable”).jqxDataTable({exportSettings: { columnsHeader: true, hiddenColumns: false, serverURL: null, characterSet: null, recordsInView: true, fileName: “jqxDataTable”}});

    Let me know what you think!

    Please, do not hesitate to contact us if you have any additional questions.

    Best Regards,
    Yavor Dashev
    jQWidgets team
    https://www.jqwidgets.com

    Adding content to Print output #120909

    loridale27
    Participant

    Works like a charm! Thanks Yavor!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.