v7.3.0

GroupSummary
Feature

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 }
    ]
})

See also

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class
  • target : 'header'/'footer'

    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).

    Has a corresponding target config.

  • isGroupSummary : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of GroupSummary class, or subclass thereof.

Functions

Functions are methods available for calling on the class
    • onBeforeRenderRow( )
      private

      Called before rendering row contents, used to reset rows no longer used as group summary rows

    • onStoreUpdate( )
      private

      Updates summaries on store changes (except record update, handled below)

    • Refreshes the summaries

    • renderCell( )
      private

      Called when a cell is rendered, styles the group rows first cell.

    CSS variables

    CSS variables that can be set to adjust appearance
    Name Description
    --b-group-summary-background Background for group summary cells
    id: groupSummary

    Source path

    Grid/feature/GroupSummary.js

    Demo

    examples/groupsummary

    Contents