jQWidgets Forums

jQuery UI Widgets Forums Grid Unable to export Data

This topic contains 6 replies, has 2 voices, and was last updated by  durian 2 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Unable to export Data #132967

    durian
    Participant

    Hi have function to export data from grid into CSV file. It is working fine at my local environment, but unfortunately it is not working when I deployed it into server. When I clicked the button, nothing happen. Is it related to firewall or browser?

    $(“#btnExport”).click(function () {
    var exportInfo;
    exportInfo = $(“#searchResultGrid”).jqxGrid(‘exportdata’, ‘csv’);
    }

    Thank you,
    Hidayah

    Unable to export Data #132968

    Hi,

    Can you please try using the exportview method?
    Here is an example: http://jsfiddle.net/g59oLp8v/

    NOTE that you need to import additional files:
    jszip.min.js and jqxexport.js

    I hope this helps you!

    Best regards,
    Svetoslav Borislavov

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

    Unable to export Data #132970

    durian
    Participant

    Do I need to import any library? Currently it shows this error message

    Unable to export Data #132971

    durian
    Participant

    I found why this code below is not working because my website have secure ssl, but this http://jquerygrid.net/export_server/dataexport.php don’t have secure ssl. Any advise?

    $(“#btnExport”).click(function () {
    var exportInfo;
    exportInfo = $(“#searchResultGrid”).jqxGrid(‘exportdata’, ‘csv’);
    }

    Thank you

    Unable to export Data #132977

    durian
    Participant

    I manage to solve this issue, just need to include this:

    <script src=”~/Scripts/jqwidgets/jqxexport.js” type=”text/javascript”></script>
    .
    .
    .
    $(“#btnExport”).click(function () {
    $(“#searchResultGrid”).jqxGrid(‘exportview’, ‘csv’, “ListName”);
    });

    But my CSV format have double quotes example:
    “First Name”,”Last Name”,”Date”,”Address 1″, “Address 2”

    My expectation is like this example:
    First Name,Last Name,Date,Address 1,Address 2

    Any advise? Thank you.

    Unable to export Data #132981

    Hi,

    Here is a workaround for that: http://jsfiddle.net/a2o3b9kh/
    If you do not pass a fileName to the exportdata method, the data will be exported to a local variable.
    When you have the data in a variable as a string you can manually download the CSV file

    Best regards,
    Svetoslav Borislavov

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

    Unable to export Data #132982

    durian
    Participant

    Hi

    Thank you, finally issue solved 🙂

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

You must be logged in to reply to this topic.