# DataGridColumnPinChangeEvent (@salmonui/data-grid)

> The DataGridColumnPinChangeEvent interface of @salmonui/data-grid: onBeforeColumnPinChange (cancellable) / onColumnPinChange.

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

```ts
import type { DataGridColumnPinChangeEvent } 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 DataGridColumnPinChangeEvent extends DataGridEvent {
    readonly field: string;
    readonly pinned: DataGridColumnPin | null;
    readonly previousPinned: DataGridColumnPin | null;
}
```

`onBeforeColumnPinChange` (cancellable) / `onColumnPinChange`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `pinned` | `readonly pinned: DataGridColumnPin \| null;` |  | Proposed (before) or applied (after) side; `null` unpins. |
| `previousPinned` | `readonly previousPinned: DataGridColumnPin \| null;` |  |  |
| `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). |
