API REFERENCE
GridColumnRef
Fields, allowed values, and APIs that use GridColumnRef.
Type definition
A question mark (?) marks an optional field; readonly marks a value you should not change directly. A union (|) accepts one of the listed forms. Functions are callbacks that Grid invokes at the relevant point.
export interface GridColumnRef<
TData = GridData,
TValue = unknown,
TContext = unknown,
> extends GridLiveRef<TData, TValue> {
readonly id: string;
getDefinition(): Readonly<ColumnDef<TData, TValue, TContext>> | null;
getActualWidth(): number | null;
isVisible(): boolean;
getPinned(): 'left' | 'right' | null;
getSort(): GridColumnSortState | null;
getAggFunc(): string | null;
isPivotActive(): boolean;
getParent(): GridColumnGroupRef<TData, TContext> | null;
setWidth(width: number): Promise<boolean>;
setVisible(visible: boolean): Promise<boolean>;
setPinned(side: 'left' | 'right' | null): Promise<boolean>;
setSort(direction: 'asc' | 'desc' | null, options?: { multi?: boolean }): Promise<boolean>;
setAggFunc(name: string | null): Promise<boolean>;
getFilterModel(): Promise<unknown>;
setFilterModel(model: unknown | null): Promise<boolean>;
}APIs using this type
- getColumn
Finds a current column object by ID. Returns null for missing columns and reflects live state rather than an initial columnDefs copy.
- getColumns
Reads current column objects to connect widths, order, and visibility to your app.