# GroupingMethods (@salmonui/data-grid/engine)

> The GroupingMethods type of @salmonui/data-grid/engine.

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

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

Also exported from `@salmonui/data-grid/engine/grouping`.

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

## Reference

Kind: type

```ts
type GroupingMethods<Row> = {
    getGroup(ctx: ModuleContext<Row>, rowId: RowId): GroupRowSnapshot | undefined;
    getGroupRows(ctx: ModuleContext<Row>, rowId: RowId): readonly Row[];
    isExpanded(ctx: ModuleContext<Row>, group: GroupTarget): boolean;
    getLazyStatus(ctx: ModuleContext<Row>): {
        readonly status: LazyStatus;
        readonly error: unknown;
    } | null;
};
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `getGroup` | `getGroup(ctx: ModuleContext<Row>, rowId: RowId): GroupRowSnapshot \| undefined;` |  | Caption or footer snapshot by row id (`__g:` / `__gf:` ids). Identity is stable while nothing about the group changes. |
| `getGroupRows` | `getGroupRows(ctx: ModuleContext<Row>, rowId: RowId): readonly Row[];` |  | Data rows of a group (template `items`), in view order. |
| `isExpanded` | `isExpanded(ctx: ModuleContext<Row>, group: GroupTarget): boolean;` |  | Whether a group (row id, path key, or path) is expanded. |
| `getLazyStatus` | `getLazyStatus(ctx: ModuleContext<Row>): {     readonly status: LazyStatus;     readonly error: unknown; } \| null;` |  | Lazy mode root level status. |
