EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: waltex on December 15, 2015, 08:28:18 AM



Title: How to show footer row in pivotgrid?
Post by: waltex on December 15, 2015, 08:28:18 AM
hi,
i have a problem with plugin pivotgrid, not show the footer row.
I add this option:
Code:
showFooter: true

this my code:
Code:
function load_dg2() {
        $('#dg2').pivotgrid({
            title: 'Report Costo Promo ',
            toolbar: [{
                    //text: 'Layout',
                    handler: function () {
                        $('#dg2').pivotgrid('layout');
                    }
                }, {iconCls: 'icon-reload',
                    text: 'Elabora',
                    handler: function () {
                        load_dg2();
                    }}, {iconCls: 'icon-excel1',
                    text: 'Esporta',
                    handler: function () {
                        JSONToCSVConvertor2($('#dg2').pivotgrid('getRoots'), 'totali', 'label');
                    }}, {iconCls: 'icon-database_edit',
                    text: 'parametri pivot',
                    handler: function () {
                        $('#dg2').pivotgrid('layout')
                    }}],
            url: 'api/pivot/costo_promo',
            fit: true,
            showFooter: true,
            //height: '%75%',
            pivot: {
                rows: ['DESC_ECR1', 'DESC_ECR2', 'DESC_ECR3'],
                columns: ['VOLANTINO'],
                values: [
                    {field: 'MARGINE_NETTE_STIMATE', op: 'sum', width: 200},
                    {field: 'VALORE_VENDITE_STIMATE_S', op: 'sum', width: 200},
                ]
            },
            onLoadSuccess: function (row, data) {
                for (i = 0; i < $('#dg2').treegrid('getData').length; i++) {
                    $('#dg2').treegrid('collapseAll', i);
                }

            },
        });
    }


Title: Re: How to show footer row in pivotgrid?
Post by: stworthy on December 15, 2015, 09:08:10 AM
You need to call 'reloadFooter' method to display the footer rows.
Code:
$('#dg2').pivotgrid('reloadFooter', [
 {...}
]);