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

> The CompiledColumn interface of @salmonui/data-grid/engine.

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

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

Also exported from `@salmonui/data-grid`.

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: interface

```ts
interface CompiledColumn<Row> {
    readonly columnId: ColumnId;
    readonly path: readonly ColumnId[];
    readonly leaf: boolean;
    readonly depth: number;
    readonly leafIndex: number;
    readonly children: readonly ColumnId[];
    readonly def: ColumnDef<Row>;
    readonly field: string | null;
    readonly headerText: string;
    readonly accessor: (row: Row) => unknown;
    readonly setter: ((row: Row, value: unknown) => Row) | null;
    readonly type: ColumnType;
    readonly typeSource: ColumnTypeSource;
    readonly format: FormatDescriptor | null;
    readonly formatter: (value: unknown, row: Row) => string;
    readonly clipboardFormatter: (value: unknown, row: Row) => string;
    readonly parser: (input: unknown, row: Row) => unknown;
    readonly comparer: (a: unknown, b: unknown, rowA: Row, rowB: Row) => number;
    readonly width: ColumnWidthSpec;
    readonly flags: ColumnFlags;
    readonly freeze: 'left' | 'right' | 'fixed' | null;
    readonly moduleMeta: Readonly<Record<string, unknown>>;
    readonly lookup?: CompiledLookup;
}
```

Members (23):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `columnId` | `readonly columnId: ColumnId;` |  |  |
| `path` | `readonly path: readonly ColumnId[];` |  | Stacked header ancestry, root first, including this column. |
| `leaf` | `readonly leaf: boolean;` |  |  |
| `depth` | `readonly depth: number;` |  | Header depth (0 for top level). |
| `leafIndex` | `readonly leafIndex: number;` |  | Position among leaf columns in definition order; -1 for group headers. |
| `children` | `readonly children: readonly ColumnId[];` |  | Child column ids for group headers; empty for leaves. |
| `def` | `readonly def: ColumnDef<Row>;` |  |  |
| `field` | `readonly field: string \| null;` |  |  |
| `headerText` | `readonly headerText: string;` |  |  |
| `accessor` | `readonly accessor: (row: Row) => unknown;` |  |  |
| `setter` | `readonly setter: ((row: Row, value: unknown) => Row) \| null;` |  |  |
| `type` | `readonly type: ColumnType;` |  |  |
| `typeSource` | `readonly typeSource: ColumnTypeSource;` |  |  |
| `format` | `readonly format: FormatDescriptor \| null;` |  |  |
| `formatter` | `readonly formatter: (value: unknown, row: Row) => string;` |  |  |
| `clipboardFormatter` | `readonly clipboardFormatter: (value: unknown, row: Row) => string;` |  |  |
| `parser` | `readonly parser: (input: unknown, row: Row) => unknown;` |  |  |
| `comparer` | `readonly comparer: (a: unknown, b: unknown, rowA: Row, rowB: Row) => number;` |  |  |
| `width` | `readonly width: ColumnWidthSpec;` |  |  |
| `flags` | `readonly flags: ColumnFlags;` |  |  |
| `freeze` | `readonly freeze: 'left' \| 'right' \| 'fixed' \| null;` |  | Definition freeze: `fixed` (`pinned: 'center'`) stays in the center zone and is listed in `ColumnSnapshot.fixed`. |
| `moduleMeta` | `readonly moduleMeta: Readonly<Record<string, unknown>>;` |  | Filled by module `extendColumns`. |
| `lookup` | `readonly lookup?: CompiledLookup;` | optional | Set by the `lookup` module on lookup columns (raw value accessor, display lookup). |
