Properties Methods Events Config Options Direct Link

# Class Ext.ux.grid.GroupSummary

Package: | Ext.ux.grid
Defined In: | GroupSummary.js
Class: | GroupSummary
Subclasses: | HybridSummary
Extends: | Object

A GridPanel plugin that enables dynamic column calculations and a dynamically updated grouped summary row.

## Config Options

Config Options | Defined By
--- | ---

summaryRenderer : Function
Renderer example:summaryRenderer: function(v, params, data){ return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(...
Renderer example:

    summaryRenderer: function(v, params, data){
        return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(1 Task)');
    },

GroupSummary

summaryRenderer : Function
Renderer example:summaryRenderer: function(v, params, data){ return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(...
Renderer example:

    summaryRenderer: function(v, params, data){
        return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(1 Task)');
    },

GroupSummary

| summaryType : String The type of calculation to be used for the column. For options available see Calculations. | GroupSummary
| summaryType : String The type of calculation to be used for the column. For options available see Calculations. | GroupSummary

## Public Properties

Property | Defined By
--- | ---

Calculations : Object
Calculation types for summary row:<div class="mdetail-params"> sum : <div class="sub-desc"> count : <div class="sub-d...
Calculation types for summary row:

- `sum` :
- `count` :
- `max` :
- `min` :
- `average` :

Custom calculations may be implemented. An example of custom `summaryType=totalCost`:

    // define a custom summary function
    Ext.ux.grid.GroupSummary.Calculations['totalCost'] = function(v, record, field){
        return v + (record.data.estimate * record.data.rate);
    };

GroupSummary

Calculations : Object
Calculation types for summary row:<div class="mdetail-params"> sum : <div class="sub-desc"> count : <div class="sub-d...
Calculation types for summary row:

- `sum` :
- `count` :
- `max` :
- `min` :
- `average` :

Custom calculations may be implemented. An example of custom `summaryType=totalCost`:

    // define a custom summary function
    Ext.ux.grid.GroupSummary.Calculations['totalCost'] = function(v, record, field){
        return v + (record.data.estimate * record.data.rate);
    };

GroupSummary

## Public Methods

Method | Defined By
--- | ---

showSummaryMsg( `String groupValue`, `String msg` ) : void
Show a message in the summary row. grid.on('afteredit', function(){ var groupValue = 'Ext Forms: Field Anchoring'...
Show a message in the summary row.

    grid.on('afteredit', function(){
        var groupValue = 'Ext Forms: Field Anchoring';
        summary.showSummaryMsg(groupValue, 'Updating Summary...');
    });

Parameters:

- `groupValue` : String
- `msg` : String
  Text to use as innerHTML for the summary row.

Returns:

- void

GroupSummary

toggleSummaries( `Boolean visible` ) : void
Toggle the display of the summary row on/off
Toggle the display of the summary row on/off
Parameters:

- `visible` : Boolean
  `true` to show the summary, `false` to hide the summary.

Returns:

- void

GroupSummary

## Public Events

This class has no public events.