API REFERENCE
SyGridApi
Fields, allowed values, and APIs that use SyGridApi.
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 SyGridApi<
TData = GridData,
TContext = unknown,
TValue = unknown,
TFilterModel = unknown,
> extends HTMLElement,
SyGridImperativeMethods<TData, TContext, TValue, TFilterModel> {
rowData?: TData[];
columnDefs?: Array<GridColumnDefinition<TData, TContext, TValue>>;
context?: TContext;
getRowId?: GridGetRowId<TData>;
components?: GridComponentLocalDefinitions<
TData,
TValue,
TFilterModel,
TContext
>;
externalFilter?:
| GridExternalFilterCallbacks<TData>
| GridExternalFilterInstance<TData, TContext>;
componentTimeoutMs?: number;
addEventListener<K extends keyof SyGridEventMap<TData, TContext, TValue>>(
type: K,
listener:
| SyGridEventListener<
SyGridEventMap<TData, TContext, TValue>[K],
TData,
TContext,
TValue
>
| null,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject | null,
options?: boolean | AddEventListenerOptions,
): void;
removeEventListener<K extends keyof SyGridEventMap<TData, TContext, TValue>>(
type: K,
listener:
| SyGridEventListener<
SyGridEventMap<TData, TContext, TValue>[K],
TData,
TContext,
TValue
>
| null,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject | null,
options?: boolean | EventListenerOptions,
): void;
}APIs using this type
- getApi
Accesses the current Grid's typed API and app context. Read from a fully initialized element.