jQWidgets Forums

jQuery UI Widgets Forums Grid Export grid with hidden columns

This topic contains 3 replies, has 4 voices, and was last updated by  Yavor Dashev 3 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Export grid with hidden columns #18555

    yougotnet
    Participant

    I have hidden columns that are set exportable: true, but the export do not include columns if they are hidden.

    How do I get this to work?

    Export grid with hidden columns #18577

    Peter Stoev
    Keymaster

    Hi,

    The definition of the exportdata method is as follows:

    exportdata: function (dataType, fileName, exportHeader, rows, exportHiddenColumns, exportServer, charSet) {

    So to export the hidden columns, the 4th param should be set to true.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Export grid with hidden columns #120764

    mr_kirkwood
    Participant

    I am using jqxGrid. I am jqxGrid column chooser. When I turn off a column then export it to excel, all the columns are showing up.

    $ (“#csvExport2”).jqxButton ();
    $ (“#csvExport2”).click (function ()
    {
    $ (“#leaseSortTable”).jqxGrid (‘exportData’, ‘xls’, ‘LeaseTable’, true, null, true, ‘https://dev30.wygisc.org/JqxWidgetsTesting/dataexport.php’);
    });

    Export grid with hidden columns #120769

    Yavor Dashev
    Participant

    Hi mr_kirkwood,

    This behavior is caused by the way you define the export method arguments and in particular the 5th argument which is responsible for exporting hidden columns. If you set it to false it will not export the hidden columns.

    I have create a jsfiddle to showcase you this functionality: http://jsfiddle.net/6oqv7fuh/8/

    Let me know if that works for you!

    Please, don’t hesitate to contact us if you have any questions!

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

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

You must be logged in to reply to this topic.