SU01 Client-Side Summary
Calculate and display aggregates from grid data
Live Demo
Summary bar shows totals calculated from all items.
Code
Summary Callback
Configuration
Position
Callback Context
The summaryContentCallback receives:
items— Current page itemsallItems— All items (before pagination)totalItems— Total countcurrentPage/pageSizemetadata— Server metadata
Returns an HTML string displayed in the summary bar.
SU02 Server-Side Summary
Display server-provided aggregates via summaryMetadata
Live Demo
Summary uses server-provided metadata instead of client calculation.
Code
Server Metadata
Description
Server-Side Aggregates
For server-side pagination, the client may not have all data for calculations. Use summaryMetadata to pass server-computed values.
How It Works
- Server computes aggregates (totals, averages, etc.)
- Pass them to
grid.summaryMetadata - Access via
ctx.metadatain the callback
API Reference
| Property | Type | Default | Description |
|---|---|---|---|
summaryPosition | string | - | Position(s): 'bottom-left', 'top-right', 'top-right|bottom-right' |
summaryContentCallback | (ctx) => string | - | Callback returning HTML content for the summary bar |
summaryMetadata | unknown | - | Server-provided metadata passed to summaryContentCallback as ctx.metadata |
isSummaryInline | boolean | true | When true, summary shares the row with pagination. When false, gets its own row. |