# DataGridGroupCaptionContext (@salmonui/data-grid)

> The DataGridGroupCaptionContext interface of @salmonui/data-grid: Context of grouping.renderCaption.

Canonical: https://salmonui.dev/docs/reference/data-grid/DataGridGroupCaptionContext

```ts
import type { DataGridGroupCaptionContext } from '@salmonui/data-grid';
```

Entry index: https://salmonui.dev/docs/reference/data-grid (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid.md).

## Reference

Kind: interface

```ts
interface DataGridGroupCaptionContext<Row> {
    readonly group: GroupRowSnapshot;
    readonly field: string;
    readonly header: string;
    readonly key: GroupRowSnapshot['key'];
    readonly value: unknown;
    readonly formattedKey: string;
    readonly count: number;
    readonly expanded: boolean;
    readonly aggregates: AggregateValues;
    readonly rows: () => readonly Row[];
    readonly toggle: () => void;
}
```

Context of `grouping.renderCaption`.

Members (11):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `group` | `readonly group: GroupRowSnapshot;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `header` | `readonly header: string;` |  |  |
| `key` | `readonly key: GroupRowSnapshot['key'];` |  | JSON key and raw value of the group. |
| `value` | `readonly value: unknown;` |  |  |
| `formattedKey` | `readonly formattedKey: string;` |  |  |
| `count` | `readonly count: number;` |  |  |
| `expanded` | `readonly expanded: boolean;` |  |  |
| `aggregates` | `readonly aggregates: AggregateValues;` |  |  |
| `rows` | `readonly rows: () => readonly Row[];` |  | Data rows of the group (computed on call). |
| `toggle` | `readonly toggle: () => void;` |  |  |
