jQWidgets Forums

jQuery UI Widgets Forums Grid Grid exportdata calling www.jqwidgets.com

This topic contains 5 replies, has 3 voices, and was last updated by  Peter Stoev 9 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Grid exportdata calling www.jqwidgets.com #9746

    carlo
    Participant

    Hello,

    although we specify a local url, jqxGrid(‘exportdata’, ‘xls’, ‘alarms’, url) is still calling http://www.jqwidgets.com.

    jqx version: 2.5

    Best Regards,
    Karlheinz

    Grid exportdata calling www.jqwidgets.com #9808

    Peter Stoev
    Keymaster

    Hi Karlheinz,

    Please, see the Grid API about that method.

    Here’s what the documentation says:

    The first parameter of the export method determines the export’s type – ‘xls’, ‘xml’, ‘html’, ‘json’, ‘tsv’ or ‘csv’.
    The second parameter is the file’s name.
    The third parameter is optional and determines whether to export the column’s header or not. Acceptable values are – true and false. By default, the exporter exports the columns header.
    The fourth parameter is optional and determines the array of rows to be exported. By default all rows are exported. Set null, if you want all rows to be exported.
    The last parameter is optional and determines the url of the export server. By default, the exporter is hosted on the jQWidgets website.
    Code example

    Invoke the export method.

    $(“#jqxgrid”).jqxGrid(‘exportdata’, ‘json’, ‘jqxGrid’);

    Best Regards,
    Peter SToev

    jQWidgets Team
    http://www.jqwidgets.com


    GildoMat59
    Participant

    Hi Peter,

    I have to use the Grid exportdata, but it will be used in intranet, where your server is not visible. for this reason I had to use the ‘save-file.php’ on my server. the internal directory is ‘php\save-file.php’.

    I red the documentation:

    Export(requires jqxdata.export.js and jqxgrid.export.js)
    exportdata Method
    Exports all rows loaded within the Grid to Excel, XML, CSV, TSV, HTML or JSON.

    The first parameter of the export method determines the export’s type – ‘xls’, ‘xml’, ‘html’, ‘json’, ‘pdf’, ‘tsv’ or ‘csv’.
    The second parameter is the file’s name. If you don’t provide a file name, the Grid will export the data to a local variable.
    For example:
    var data = $(“#jqxgrid”).jqxGrid(‘exportdata’, ‘json’);

    The third parameter is optional and determines whether to export the column’s header or not. Acceptable values are – true and false. By default, the exporter exports the columns header.
    The fourth parameter is optional and determines the array of rows to be exported. By default all rows are exported. Set null, if you want all rows to be exported.
    The fifth parameter is optional and determines whether to export hidden columns. Acceptable values are – true and false. By default, the exporter does not export the hidden columns.
    The sixth parameter is optional and determines the url of the export server. By default, the exporter is hosted on a jQWidgets server.
    The last parameter is optional and determines the char set.
    Code example

    Invoke the exportdata method.

    $(“#jqxGrid”).jqxGrid(‘exportdata’, ‘json’, ‘jqxGrid’);

    Code example with custom URL parameter

    $(“#jqxGrid”).jqxGrid(‘exportdata’, ‘json’, ‘jqxGrid’, true, null, true, http://www.myserver.com/save-file.php);

    so I tryed on localhost but dosent works. the call is this:

    $(“#jqxTreeML”).jqxTreeGrid(‘exportdata’, ‘xls’,’myfile’,true,null,true, http://localhost:90/MyLMS_Compact/php/save-file.php );

    but I had this error:

    Uncaught SyntaxError: missing ) after argument list

    Also with this code:

    $(“#jqxTreeML”).jqxTreeGrid(‘exportdata’, ‘xls’,’myfile’,true,null,true, “http://localhost:90/MyLMS_Compact/php/save-file.php” );

    I have this error:

    Uncaught jqxCore: Invalid parameter ‘[exportdata, xls, myfile, true, {}, true, http://localhost:90/MyLMS_Compact/php/save-file.php%5D‘ does not exist.

    Do you have any suggestion?
    Thanks
    Gildo


    Peter Stoev
    Keymaster

    Hi Gildo

    I suggest you to look at the documentation and examples of the TreeGrid widget, because the exportdata method’s definition and arguments are different.

    Best Regards,
    Peter SToev

    jQWidgets Team
    http://www.jqwidgets.com


    GildoMat59
    Participant

    Hi Peter

    Thanks for your answer, I red the doc about the TreeGrid and it is write that I cannot target the php modeule on my server, so I cannot export data if the system is on intranet. that is true?

    Regards
    Gildo


    Peter Stoev
    Keymaster

    Hi Gildo,

    You should update the exportSettings if you want to export to a different server in jqxTreeGrid or in jqxDataTable.

    Best Regards,
    Peter SToev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.