# DataGridErrorEvent (@salmonui/data-grid)

> The DataGridErrorEvent interface of @salmonui/data-grid: onError (type: 'error'): a rejected action. Not cancellable.

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

```ts
import type { DataGridErrorEvent } 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 DataGridErrorEvent extends DataGridEvent {
    readonly error: Error;
    readonly action: 'sort' | 'filter' | 'search' | 'page' | 'data' | 'save' | 'persistState' | (string & {});
}
```

`onError` (`type: 'error'`): a rejected action. Not cancellable.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `error` | `readonly error: Error;` |  |  |
| `action` | `readonly action: 'sort' \| 'filter' \| 'search' \| 'page' \| 'data' \| 'save' \| 'persistState' \| (string & {});` |  | `data`: the data source failed to load (the body shows `renderError`). `save`: a write (save or delete) failed or was rejected in part; the failed rows keep their drafts (`onSave` carries the result). |
| `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). |
