Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.15 KB

jqgrid-footer-row-(-total-row-).rst

File metadata and controls

41 lines (32 loc) · 1.15 KB

jqGrid Footer Row ( Total Row )

$("#rescList").jqGrid({
    ...
    footerrow : true,

    colModel:[
        ...
        {name:'unit' },
        {name:"tot_before_sum_qty" },
        {name:"today_qty" },
        {name:"total_qty" },
        ...
    ],

    loadComplete: function(){
        // footer data
        $(this).jqGrid("footerData", "set", {
            unit: "Total:",
            tot_before_sum_qty: $(this).jqGrid('getCol', 'tot_before_sum_qty', false, 'sum'),
            today_qty: $(this).jqGrid('getCol', 'today_qty', false, 'sum'),
            total_qty: $(this).jqGrid('getCol', 'total_qty', false, 'sum')
        });
    },
    ...

// resize
$('#rescList').jqGrid("setGridHeight", $(this).height()
    - $('.search_area', this).outerHeight()
    - $('.workcalendar', this).outerHeight()
    - $('tr.footrow', this).outerHeight()
    - 25 );