jQWidgets Forums

jQuery UI Widgets Forums Grid Export using local server example

This topic contains 15 replies, has 6 voices, and was last updated by  Peter Stoev 6 years, 7 months ago.

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
  • Export using local server example #19380

    DavidSimmons
    Participant

    Is there an example exporting using a local server? I would appreciate some help with this…

    Thanks…

    Export using local server example #19415

    Dimitar
    Participant

    Hello DavidSimmons,

    To be able to export using a local server, you would have to host the file save-file.php on your server and specify the url to the file as the last parameter to the exportdata method. Here is more on the method from the jqxGrid API Documentation:

    Exports all rows loaded within the Grid to Excel, XML, CSV, TSV, HTML, PDF or JSON.

    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. 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 last parameter is optional and determines the url of the export server. By default, the exporter is hosted on a jQWidgets server.

    Best Regards,
    Dimitar

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

    Export using local server example #19556

    DavidSimmons
    Participant

    I seem to having an issue with the fourth parameter. When you say Set null for all rows, do you mean ”?

    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.

    $(jqxgrid).jqxGrid(‘exportdata’, ‘csv’, ‘jqxgrid’, true, ” ,true,’http://192.168.1.10′);

    Export using local server example #19557

    marchip
    Member

    try this

    $(jqxgrid).jqxGrid(‘exportdata’, ‘csv’, ‘jqxgrid’, true,null ,true,’http://192.168.1.10:8242′);

    Marco

    Export using local server example #19561

    DavidSimmons
    Participant

    Marco thanks, but does not work. If you leave anything out it goes to the JQWidgets server.

    By the documentation I can’t tell if null is something like this (Which goes to the JQWidgets server and gives me column headings)
    $(jqxgrid).jqxGrid(‘exportdata’, ‘csv’, jqxgrid, true, true, ‘http://192.168.1.10’);

    Things I have tried…
    $(jqxgrid).jqxGrid(‘exportdata’, ‘csv’, jqxgrid, true, ”, true, ‘http://192.168.1.10’);

    $(jqxgrid).jqxGrid(‘exportdata’, ‘csv’, jqxgrid, true, “”, true, ‘http://192.168.1.10’);

    $(jqxgrid).jqxGrid(‘exportdata’, ‘csv’, jqxgrid, true, true, ‘http://192.168.1.10’);

    $(jqxgrid).jqxGrid(‘exportdata’, ‘csv’, jqxgrid, true, null, true, ‘http://192.168.1.10’);

    Seems like an example in the document page would help define what they mean as null…

    I know I don’t want my data going to their site….

    Export using local server example #19569

    Peter Stoev
    Keymaster

    Hi guys,

    By null, we mean null, not “”. In addition, the URL parameter should point to the save-file.php hosted on your server.

    Regards,
    Peter Stoev

    Export using local server example #20869

    DavidSimmons
    Participant

    Can you please help me understand what I am doing wrong. I need all records exported to csv.

    $(jqxgrid).jqxGrid(‘exportdata’, ‘csv’, ‘Application’, true, ,true, ‘http://192.168.1.10/jqw/save-file.php’);

    Export using local server example #21153

    dfleming
    Participant

    try this: $(jqxgrid).jqxGrid(‘exportdata’,’csv’,’Application’, true, null, true, ‘/jqw/safe-file.php’);

    Don’t forget the null, “true,null,true” not “true,,true”

    Export using local server example #101927

    _ar_
    Member

    I am doing local development. Several questions
    Is the last paramter ie, url mandatory?
    Where is the actual export done?
    Is it on client or on server?
    If server, which server? Is it jqwidget’s server?

    My local dev env server is based on google appengine java. Therefore, I cannot provide a php file.

    Export using local server example #101929

    Peter Stoev
    Keymaster

    Hi rajesh.gupta,

    The url is mandatory if you wish the export to happen to your server and you own a license with the dataexport.php file included in it i.e Developer or Team license. If you omit the url param, the export will be for evaluation purposes only going through our server with data export limitations.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com

    Export using local server example #101944

    _ar_
    Member

    What is the equivalent of dataexport.php in java/servlet.

    Please give more steps: Is the export happening on the client side? Is export happening on the server side? If on server side, what jar file needs to be included?

    We also tried omitting the url on local server dev, nothing happens.

    Export using local server example #101948

    Peter Stoev
    Keymaster

    Hi rajesh.gupta,

    For Java, you can still use a PHP file for export. The export happens both client and server side. You cannot omit the URL param.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com

    Export using local server example #101993

    _ar_
    Member

    We are running a java local server (java appengine). Please explain the steps. we are confused.
    Please point to a document.

    We tried the following on the java local server
    – we omitted the url. it does not work.

    Where should we include the php file on the java local server?

    Thanks.

    Export using local server example #101997

    Peter Stoev
    Keymaster

    Hi Rajesh,

    The data export uses a PHP file called dataexport.php. The URL param should point to the file’s location on your server. Like https://www.myserver.com/export/dataexport.php.

    Regards,
    Peter

    Export using local server example #102018

    _ar_
    Member

    We owned a license with the ‘dataexport.php’ file included in it and we put it on web app folder(server) as you said above.
    We included the URL parameter in export data method which points to the file ‘dataexport.php’ location on server.
    – But we are still getting same error.

    * We are running java local server.

    What might be the problem?

    Can you please help me out with this issue?

    Thanks.

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.