Cell Summaries Technical Reference
Summary
- Custom Summary Options can be provied in Cell Summary Options
- Programmatic access to Cell Summaries is via the Cell Summary API
- Row Summaries are defined as part of a Layout (in Layout Initial Adaptable State)
Cell Summary Options
The Cell Summary Options section of Adaptable Options contains a single collection:
| Property | Type | Description | Default |
|---|---|---|---|
| customCellSummaryOperations | CustomCellSummaryOperation<TData>[] | Custom Numeric Cell Summary Operations to add to set shipped by AdapTable | |
| numericDisplayFormat | NumberFormatterOptions| ((columnContext:AdaptableColumnContext) =>NumberFormatterOptions) | Numeric format to use for summary value; a Format Column DisplayFormat will take precedence | FractionDigits: 2 |
Cell Summary Operation
A Cell Summary Operation is defined as follows:
| Property | Type | Description |
|---|---|---|
| operationFunction | (operationContext:CustomCellSummaryOperationContext<TData>) => any | Function to run when a summary result is required |
| operationName | string | Name of the Operation - will be displayed in the Cell Summary components |
Cell Summary API
The Cell Summary API section of Adaptable API contains functions to retrieve Cell Summary information programmatically
| Method | Returns | Description |
|---|---|---|
| getCellSummaryOperationValue(operation) | any | Retrieves the value of the given Cell Summary Operation |
| getCurrentCellSummaryOperation() | CustomCellSummaryOperation | string | Retrieves currently selected Cell Summary Operation |
| getCurrentCellSummaryOperationValue() | number | Retrieves the value of the current selected Cell Summary Operation |
| getCustomCellSummaryOperations() | CustomCellSummaryOperation[] | Retrieves all Custom Cell Summary Operations |
| openCellSummaryPopupSettingsPanel() | void | Opens Cell Summary Settings Panel with |
| setCurrentCellSummaryOperation(operation) | void | Sets the currently selected Cell Summary Operation |
Row Summary Definition
Row Summaries are provided as part of Layout Initial Adaptable State.
Each Row Summary is defined as follows:
| Property | Type | Description | Default |
|---|---|---|---|
| ColumnsMap | Record<string, SummarySupportedExpression> | Map of Columns with Summary Expressions | |
| IncludeOnlyFilteredRows | boolean | Evaluates only currently filtered rows in the summary | true |
| Position | RowSummaryPosition | Where Row Summary appears - 'Top' or 'Bottom' | |
| IsReadOnly | boolean | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') | |
| IsSuspended | boolean | Suspends (i.e. turns off) an Adaptable Object |