jQWidgets Forums

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Export to Excel Export to Excel #133299

    durian
    Participant

    Hi ivanpeevski, below is a block of code for the dataAdapter. I have change, type: ‘date’ as shown below. However, the excel format my column (Trxn. Date) not showing the accurate date but the end of the month date, example like this value: 06/30/2023. I want the column to show date and time, for example value: 15/06/2023 1145

    var source = {
    datatype: “json”,
    datafields: [
    { name: ‘RowNum’, type: ‘int’ },
    { name: ‘LOCA_FULL_NAME’, type: ‘string’ },
    { name: ‘TPYM_TRX_NBR’, type: ‘string’ },
    { name: ‘TPYM_REF_NBR’, type: ‘string’ },
    { name: ‘TPYM_TRXN_DATE’, type: ‘date’},
    { name: ‘TPYM_PAYMT_AMT’, type: ‘string’ },
    { name: ‘TPYM_POS_ID’, type: ‘string’ },
    { name: ‘TPYM_PLATFORM’, type: ‘string’ },
    { name: ‘LAST_VERSION’, type: ‘string’ },
    { name: ‘TPYM_TRX_TYPE’, type: ‘string’ },
    { name: ‘FILM_CODE’, type: ‘string’ },
    { name: ‘TPYM_NAME’, type: ‘string’ },
    { name: ‘SHOW_DATE’, type: ‘date’},
    { name: ‘SHOW_TIME’, type: ‘string’ }
    ],
    id: ‘RowNum’,
    localdata: ‘[{}]’,
    totalrecords: 0
    };

    // load virtual data.
    var rndrDateTime = function (row, column, cellvalue) {
    if (cellvalue === undefined || cellvalue === null || cellvalue === “”)
    return “”;

    var cellvalue = $.jqx.dataFormat.formatdate(new Date(cellvalue.split(“T”)), ‘@AppSetting.DateTimeFormat’);

    //return cellvalue;
    return ‘<span style=”margin: 10px 3px; font-size: 12px; float: left; “>’ + cellvalue + ‘</span>’;
    }

    var dataAdapter = new $.jqx.dataAdapter(source);

    in reply to: Unable to export Data Unable to export Data #132982

    durian
    Participant

    Hi

    Thank you, finally issue solved 🙂

    in reply to: Unable to export Data 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.

    in reply to: Unable to export Data 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

    in reply to: Unable to export Data Unable to export Data #132970

    durian
    Participant

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

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