# DataGridBeforeFillEvent (@salmonui/data-grid)

> The DataGridBeforeFillEvent interface of @salmonui/data-grid: onBeforeFill: preventDefault() cancels the fill.

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

```ts
import type { DataGridBeforeFillEvent } 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 DataGridBeforeFillEvent extends DataGridEvent {
    readonly range: {
        readonly anchor: DataGridClipboardCell;
        readonly focus: DataGridClipboardCell;
    };
    readonly target: DataGridClipboardCell;
}
```

`onBeforeFill`: `preventDefault()` cancels the fill.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `range` | `readonly range: {     readonly anchor: DataGridClipboardCell;     readonly focus: DataGridClipboardCell; };` |  | The source range whose values are tiled. |
| `target` | `readonly target: DataGridClipboardCell;` |  | The cell the range is extended to. |
| `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). |
