# ColumnsMoveCommand (@salmonui/data-grid/engine)

> The ColumnsMoveCommand type of @salmonui/data-grid/engine: Moves a leaf so that its index among the visible leaves becomes toIndex. Rejected when the move crosses a freeze zone (crossesFreezeZone), moves a lockColumn column, or places a column before a locked one (columnLocked).

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

```ts
import type { ColumnsMoveCommand } from '@salmonui/data-grid/engine';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine.md).

## Reference

Kind: type

```ts
type ColumnsMoveCommand = {
    readonly type: 'columns.move';
    readonly columnId: ColumnId;
    readonly toIndex: number;
};
```

Moves a leaf so that its index among the visible leaves becomes `toIndex`.
Rejected when the move crosses a freeze zone (`crossesFreezeZone`), moves a
`lockColumn` column, or places a column before a locked one (`columnLocked`).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `readonly type: 'columns.move';` |  |  |
| `columnId` | `readonly columnId: ColumnId;` |  |  |
| `toIndex` | `readonly toIndex: number;` |  |  |
