# DataGridBeforeExportEvent (@salmonui/data-grid)

> The DataGridBeforeExportEvent interface of @salmonui/data-grid: Before an Excel or PDF export: preventDefault() cancels (the method resolves to null).

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

```ts
import type { DataGridBeforeExportEvent } 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 DataGridBeforeExportEvent<Row> extends DataGridEvent {
    readonly format: ExportFormat;
    readonly options: DataGridExportOptions<Row>;
}
```

Before an Excel or PDF export: `preventDefault()` cancels (the method resolves to null).

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `format` | `readonly format: ExportFormat;` |  |  |
| `options` | `readonly options: DataGridExportOptions<Row>;` |  |  |
| `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). |
