API REFERENCE

getColumn

Finds a current column object by ID. Returns null for missing columns and reflects live state rather than an initial columnDefs copy.

What does this API do?

Finds a current column object by ID. Returns null for missing columns and reflects live state rather than an initial columnDefs copy.

Exact input and result types

typescript
getColumn<TValue = unknown>(columnId: string): Promise<GridColumnRef<GridData, TValue, unknown> | null>
ArgumentsRequiredType
columnIdRequiredstring

The return type is Promise<GridColumnRef<GridData, TValue, unknown> | null>.

Usage flow

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

Read related types

Feature explanations and examples