# DataGridBeforePrintEvent (@salmonui/data-grid)

> The DataGridBeforePrintEvent interface of @salmonui/data-grid: beforePrint: preventDefault() cancels. Fired by print() before window.print().

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

```ts
import type { DataGridBeforePrintEvent } 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 DataGridBeforePrintEvent extends DataGridEvent {
    readonly scope: 'all' | 'page';
    readonly hierarchy: ExportHierarchyMode;
}
```

`beforePrint`: `preventDefault()` cancels. Fired by `print()` before `window.print()`.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `scope` | `readonly scope: 'all' \| 'page';` |  |  |
| `hierarchy` | `readonly hierarchy: ExportHierarchyMode;` |  |  |
| `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). |
