GroupSummary

Displays a summary row as a group footer in a grouped grid. Uses the same configuration options on columns as Summary.

This feature is disabled by default.

new Grid({
    features : {
        group        : 'city',
        groupSummary : true
    },
    columns : [
        { text : 'Score', data : 'score', width : 80, sum : 'sum' }
        { text : 'Rank', data : 'rank', width : 80, sum : 'average', summaryRenderer: ({ sum }) => return 'Average rank ' + sum }
    ]
})

Group summary
//<code-header>
fiddle.title = 'Group summary';
//</code-header>
const grid = new Grid({
    appendTo : targetElement,

    // makes grid as high as it needs to be to fit rows
    autoHeight : true,

    features : {
        group        : 'city',
        groupSummary : true
    },

    data : DataGenerator.generateData(10),

    columns : [
        { field : 'name', text : 'Name', flex : 1 },
        { field : 'city', text : 'City', flex : 1, summaries : [{ sum : 'count', label : 'Rows' }] },
        { field : 'score', text : 'Score', flex : 1, summaries : [{ sum : 'avg', label : 'Average' }] }
    ]
});

Configs

11

Common

disabledInstancePlugin
listenersEvents

Other

Configure as true to have group summaries rendered in the group header when a group is collapsed.

const grid = new Grid({
   features : {
       groupSummary : {
           collapseToHeader : true
       }
   }
});

Only applies when target is 'footer' (the default).

target: header | footer= footerAlso a property

Where to render the group summaries to, either header to display them in the group header or footer to display them in the group footer (the default).

const grid = new Grid({
   features : {
       groupSummary : {
           target : 'header'
       }
   }
});

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

17

Common

disabledInstancePlugin

Class hierarchy

isGroupSummary: Boolean= truereadonly
Identifies an object as an instance of GroupSummary class, or subclass thereof.
isGroupSummary: Boolean= truereadonlystatic
Identifies an object as an instance of GroupSummary class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Other

Set to true to have group summaries rendered in the group header when a group is collapsed.

Only applies when target is 'footer' (the default).

target: header | footerAlso a config

Where to render the group summaries to, either header to display them in the group header or footer to display them in the group footer (the default).

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Functions

29

Other

Refreshes the summaries

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Events

5
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

5
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

1

CSS variables

1
NameDescription
--b-group-summary-backgroundBackground for group summary cells