API REFERENCE

getContextMenuItems

Calculates context-menu items for a displayed row and field.

What does this API do?

Calculates context-menu items for a displayed row and field.

API for Pro features: Built-in context menu

Exact input and result types

typescript
getContextMenuItems(target: { rowIndex: number; field?: string }): Promise<ContextMenuItem[]>
ArgumentsRequiredType
targetRequired{ rowIndex: number; field?: string }

The return type is Promise<ContextMenuItem[]>.

Usage flow

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