jQWidgets Forums

jQuery UI Widgets Forums Grid Exportdata not showing formating options

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 8 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Exportdata not showing formating options #87776

    nja
    Participant

    Hi,
    Have a very simple grid that I am exporting.

    However, the numeric formatting and the altrows styling is not showing on the export.

    The date format and the column alignment format settings *are* showing correctly.

    Please let me know if I have missed something obvious or next steps for trouble shooting.

    thanks,
    nja

    
                // ==================  TOOLBAR BUTTONS ========================//
                //$("#printHtmlButton").jqxButton({ height: '28px', width: '100px', theme: theme, template: 'warning' });
                $("#exportButton").jqxButton({ height: '28px', width: '100px', theme: theme, template: 'primary' });
                $("#refreshButton").jqxButton({ height: '28px', width: '80px', theme: theme, });
    
                $("#refreshButton").click(function () {
                    $('#jqxGrid').jqxGrid('updatebounddata', 'data');
    
                });
    
                $("#exportButton").click(function () {
                    //$("#jqxGrid").jqxGrid('exportdata', 'json', 'jqxGrid', true, null, true, http://www.myserver.com/save-file.php);
                    $("#jqxGrid").jqxGrid('exportdata', 'xls', 'IDA-Checkbook-Log', true, null, false, '@ViewBag.ExportURL');
    
                });
    
                // ============ CREATE THE INVOICES GRID ===================//
                //prepare the data, each datafield should have a “type” field – “string”, “number”, “bool” or “date”.
                var urlToGoTo = '/Reports/getCheckbookLog/';
                var source = {
                    type: "POST",
                    datatype: "json",
                    datafields: [
                        { name: 'RegisterId', type: 'number' },
                        { name: 'TransDate', type: 'date' },
                        { name: 'TransId', type: 'string' },
                        { name: 'Payee', type: 'string' },
                        { name: 'Credit', type: 'number' },
                        { name: 'Debit', type: 'number' },
                        { name: 'Balance', type: 'number' },
    
                    ],
                    url: urlToGoTo
                };
    
                $("#jqxGrid").on("bindingcomplete", function (event) {
                    $('#jqxGrid').jqxGrid('hideloadelement');
    
                });
    
                var dataAdapter = new $.jqx.dataAdapter(source);
    
                $("#jqxGrid").jqxGrid({
                    width: '80%',
                    height: 450,
                    source: dataAdapter,
                    theme: theme,
                    showstatusbar: true,
                    statusbarheight: 25,
                    showaggregates: false,
                    enabletooltips: true,
                    enableellipsis: true,
                    editable: false,
                    sortable: true,
                    filterable: true,
                    columnsresize: true,
                    altrows: true,
                    columns: [
                        { text: 'RegisterId', datafield: 'RegisterId', hidden: true },
                        { text: 'Date', datafield: 'TransDate', cellsformat: 'MM/dd/yyyy', width: '12%', },
                        { text: 'Check Number', datafield: 'TransId', width: '12%', },
                        { text: 'Payee (Case)', datafield: 'Payee', width: '40%', },
                        { text: 'Credits', datafield: 'Credit', width: '12%', cellsformat: 'f2', cellsalign: 'right' },
                        { text: 'Debits', datafield: 'Debit', width: '12%', cellsformat: 'f2', cellsalign: 'right', },
                        { text: 'Balance', datafield: 'Balance', width: '12%', cellsformat: 'f2', cellsalign: 'right', },
                    ]
                });
            });
    Exportdata not showing formating options #87788

    Hristo
    Participant

    Hello nja,

    About altrows, it is not possible to visualize in pdf format.
    Could do this in html and xls format, but should to set theme.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Exportdata not showing formating options #87803

    nja
    Participant

    Hi,
    Thanks for the reply. Theme is set earlier in the code, var theme = ‘classic’;

    Regardless, I set it manually and tried different themes; it it did not make a difference. No alt rows.

    I tried exporting to html and still no alt rows in the excel.

    Any other idea?

    thanks,
    nja

    Exportdata not showing formating options #87816

    Hristo
    Participant

    Hello nja,

    Unfortunately, not work with all themes.
    Please, take a look this example.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.