# DataGridDialogContext (@salmonui/data-grid)

> The DataGridDialogContext interface of @salmonui/data-grid: Context of editing.renderDialog, renderDialogHeader, renderDialogFooter.

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

```ts
import type { DataGridDialogContext } 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 DataGridDialogContext<Row> {
    readonly row: Row;
    readonly rowId: RowId;
    readonly isNew: boolean;
    readonly fields: readonly DataGridDialogField<Row>[];
    readonly errors: readonly string[];
    save(): void;
    cancel(): void;
}
```

Context of `editing.renderDialog`, `renderDialogHeader`, `renderDialogFooter`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `row` | `readonly row: Row;` |  |  |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `isNew` | `readonly isNew: boolean;` |  |  |
| `fields` | `readonly fields: readonly DataGridDialogField<Row>[];` |  |  |
| `errors` | `readonly errors: readonly string[];` |  | Row-level errors (`validateRow`, server errors). |
| `save` | `save(): void;` |  |  |
| `cancel` | `cancel(): void;` |  |  |
