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

> The resolveColumnWidth function of @salmonui/data-grid/engine: Resolves a column width to pixels. Percent widths need the container width. Returns null for auto (measured by the renderer) or when a percent width has no container width yet.

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

```ts
import { resolveColumnWidth } 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: function

```ts
function resolveColumnWidth(width: ColumnWidthSpec, containerWidth?: number): number | null;
```

Resolves a column width to pixels. Percent widths need the container width.
Returns null for `auto` (measured by the renderer) or when a percent width
has no container width yet.
