# DataGridEditCancelEvent (@salmonui/data-grid)

> The DataGridEditCancelEvent interface of @salmonui/data-grid: onBeforeEditCancel / onEditCancel.

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

```ts
import type { DataGridEditCancelEvent } 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 DataGridEditCancelEvent extends DataGridEvent {
    readonly rowId: RowId | null;
    readonly field: string | null;
    readonly scope: 'editor' | 'batch';
}
```

`onBeforeEditCancel` / `onEditCancel`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId \| null;` |  |  |
| `field` | `readonly field: string \| null;` |  |  |
| `scope` | `readonly scope: 'editor' \| 'batch';` |  | `batch`: every pending change is discarded. |
| `type` | `type: string;` | inherited | `'sortChange'`, `'beforeSortChange'`, ... |
| `source` | `source: DataGridEventSource;` | inherited |  |
| `defaultPrevented` | `defaultPrevented: boolean;` | inherited | True after `preventDefault()` (before-events and click events). |
| `preventDefault` | `preventDefault: () => void;` | inherited | Before-events and click events: cancels the action (or the built-in behavior). |
