jQWidgets Forums

jQuery UI Widgets Forums Grid Must use the server side function to export grid?

This topic contains 4 replies, has 2 voices, and was last updated by  africanfarmer 11 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Hi boss,

    i really interest to your product. appreciated if you can assist below!

    1/ when export gri into file, it connects to the jquerygrid.net. it is the only way? can run this function at local when no connection to internet?

    2/ why no titles of grid are exported as well even i set the columns as below? i saw they have in demo. perhaps  is it caused by chinese name?

    columns: [
    { text: ‘ID’, editable: false, datafield: ‘id’, width: 50 },
    { text: ‘日期’, datafield: ‘date’, cellsformat: ‘yyyy-MM-dd’, width: 100,filtertype: ‘date’ },
    { text: ‘代理名称’, datafield: ‘agentname’, width: 100,filtertype: ‘checkedlist’},
    { text: ‘二代名称’, datafield: ‘secondagent’, width: 100,filtertype: ‘textbox’ },
    { text: ‘提单号码’, datafield: ‘blno’, width: 120, filtertype: ‘textbox’, filtercondition: ‘starts_with’,

    aggregates: [

    { ‘<b>票数</b>’:
    function (aggregatedValue, currentValue) {
    if (currentValue ) {
    return aggregatedValue + 1;
    }

    return aggregatedValue;
    }
    }
    ]},

    3/ why are not able to be run the export function when there is only 1 record in grid?

    4/ why can not export to DOC, DOCX and PDF format?


    Dimitar
    Participant

    Hello africanfarmer,

    1) The exportdata method uses a file (save-file.php) hosted on jQWidget’s website. The file is included in the source code package for customers with Developer or Enterprise license and you may use it on your server if you like. Another option is to export the grid to a local variable, which does not require save-file.php. Here is an example:

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

    2) There is no issue with Chinese characters. The third parameter of the exportdata method determines whether to export the column’s header or not. By default it is set to true, but you may also try to set it manually, i.e.:

    $("#jqxgrid").jqxGrid('exportdata', 'xls', 'jqxGrid', true);

    3) There is no issue with exporting a single row. To try a working example on the matter, modify the demo Export Data to generate only one row:

    var data = generatedata(1);

    4) Unfortunately, exporting in these formats is not supported.

    Best Regards,
    Dimitar

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

    sounds Great! Peter.

    can i export excel to a determined format of xls file? likes a form?


    Dimitar
    Participant

    Hi africanfarmer,

    There is only one, default, way of exporting files to .xls.

    Best Regards,
    Dimitar

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

    do you know any other plugin for exporting form,peter, which is adapt to jqwidgets^_^?

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

You must be logged in to reply to this topic.