jQWidgets Forums

jQuery UI Widgets Forums Grid grouping plus a grand total

This topic contains 1 reply, has 1 voice, and was last updated by  aarffy 10 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • grouping plus a grand total #65788

    aarffy
    Participant

    I’m trying to have a grand total at the bottom of a grouping grid.

    I tried using the groupsrenderer demo and adding

    showaggregates: true

    as well as modifying a column to look like this…

    text: ‘Quantity’,
    datafield: ‘quantity’,
    width: 70,
    cellsalign: ‘right’,
    aggregates: [‘sum’]

    … with no luck.

    Is there some other approach I can take? Thanks.

    grouping plus a grand total #65800

    aarffy
    Participant

    To answer my own, aggregates does work with grouping. You just need to show the status bar to see it.

    groupable: true,
    groupsrenderer: groupsrenderer,  
    
    showstatusbar: true,
    statusbarheight: 50,
    showaggregates: true,
    
    columns: [{
        ...
    },{
        text: 'Quantity', 
        datafield: 'quantity', 
        width: 70, 
        cellsalign: 'right',
        aggregates: ['sum']
    },{
        ... 
    }],
    ...
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.