jQWidgets Forums

jQuery UI Widgets Forums TreeGrid Export PDF to local variable

This topic contains 4 replies, has 2 voices, and was last updated by  ramona86 8 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Export PDF to local variable #90922

    ramona86
    Participant

    Hi guys!
    I was reading this post:
    http://www.jqwidgets.com/community/topic/must-use-the-server-side-function-to-export-grid/#post-26669
    And i’m doing something similar to this:

    var exportInfo;
    $("#excelExport").click(function () {
        exportInfo = $("#jqxgrid").jqxTreeGrid('exportdata', 'xls');
    });

    and then i use that exportInfo variable for creating the file and download it under the browser.
    It works fine for csv and xls but not for pdf, any idea? When trying to open file it says “failed to load”, like if it were malformed.
    Thanks in advance!
    Regards

    Export PDF to local variable #90924

    Peter Stoev
    Keymaster

    Hi ramona86,

    You should read the docs about TreeGrid. It is not the same widget as the Grid and the exporting process is a bit different as shown in the demos.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Export PDF to local variable #90940

    ramona86
    Participant

    Thanks for your response!
    What do you mean by different?
    I read documentation and see this:
    Exports TreeGrid Data to Excel, HTML, XML, JSON, CSV or TSV. See also the exportSettings property
    but then inmediately after that it says:
    Parameter Type Description
    exportDataType String ‘xls’, ‘html’, ‘xml’, ‘json’, ‘csv’, ‘tsv’ or ‘pdf’

    So it’s not very clear if you allow or not pdf. If i try your examples, with tree grid and server export, pdf works, but if i assign it to a variable, then it doesn’t.
    Can you please help me here?
    Thanks

    Export PDF to local variable #90947

    Peter Stoev
    Keymaster

    Hi ramona86,

    Did you look at the exportSettings? I guess you did not, because there you specify whether to export or not to a variable.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Export PDF to local variable #90955

    ramona86
    Participant

    Yes, i did, for sure, i’m using this options: { exportSettings: { columnsHeader: true, hiddenColumns: false, serverURL: null, recordsInView: true, collapsedRecords: true, fileName: null } }
    As i already mentioned, i have it working for csv and xls (exporting to a variable). The only problem is with PDF, that’s why i wanted to know if it has a different behavior.

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

You must be logged in to reply to this topic.