API REFERENCE

getApi

Accesses the current Grid's typed API and app context. Read from a fully initialized element.

What does this API do?

Accesses the current Grid's typed API and app context. Read from a fully initialized element.

Exact input and result types

typescript
getApi<TData = GridData, TContext = unknown, TValue = unknown, TFilterModel = unknown>(): Promise<SyGridApi<TData, TContext, TValue, TFilterModel>>
ArgumentsRequiredType

The return type is Promise<SyGridApi<TData, TContext, TValue, TFilterModel>>.

Usage flow

After registering and initializing the Grid element, call grid.getApi(…). 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