# autoSizeColumn

Measures currently available content and applies an appropriate width to one column.

Canonical: https://grid.syidax.com/docs/methods/autoSizeColumn/

<a id="meaning"></a>

## What does this API do?

Measures currently available content and applies an appropriate width to one column.

<a id="contract"></a>

## Exact input and result types

```typescript
autoSizeColumn(colId: string): Promise<number | null>
```

| Arguments | Required | Type |
| --- | --- | --- |
| colId | Required | string |

The return type is `Promise<number | null>`.

<a id="usage"></a>

## Usage flow

After registering and initializing the Grid element, call grid.autoSizeColumn(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

<a id="recipes"></a>

## Feature explanations and examples

- [Column sizing and pinning](https://grid.syidax.com/docs/features/column-operations.md) — Width, order, pinning, and visibility are independent column states. Combine them to pin order IDs, hide supporting information, and widen long product names.
