# contextMenuItemClicked

Emitted when a cell context-menu item runs. Read its item ID and target cell position.

Canonical: https://grid.syidax.com/docs/events/contextMenuItemClicked/

<a id="meaning"></a>

## What does this API do?

Emitted when a cell context-menu item runs. Read its item ID and target cell position.

API for Pro features: Built-in context menu

<a id="contract"></a>

## Exact input and result types

```typescript
contextMenuItemClicked: { id: string; rowIndex: number; field?: string }
```

<a id="usage"></a>

## Usage flow

Subscribe with grid.addEventListener('contextMenuItemClicked', handler). The result is in event.detail, and event names are case-sensitive. Remove subscriptions when disposing of the view.

```javascript
const controller = new AbortController();
grid.addEventListener('contextMenuItemClicked', event => {
  console.log(event.detail);
}, { signal: controller.signal });
// On view disposal: controller.abort();
```

<a id="recipes"></a>

## Feature explanations and examples

- [Cell context menus](https://grid.syidax.com/docs/features/context-menu.md) — A cell's context menu offers actions such as Copy, Copy row, and Export for the current location. Also provide toolbar or keyboard access to frequently used features.
