# DataGridCellClickEvent (@salmonui/data-grid)

> The DataGridCellClickEvent interface of @salmonui/data-grid: onCellClick / onCellDoubleClick. preventDefault() cancels the built-in action.

Canonical: https://salmonui.dev/docs/reference/data-grid/DataGridCellClickEvent

```ts
import type { DataGridCellClickEvent } from '@salmonui/data-grid';
```

Entry index: https://salmonui.dev/docs/reference/data-grid (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid.md).

## Reference

Kind: interface

```ts
interface DataGridCellClickEvent<Row> extends DataGridEvent {
    readonly rowId: RowId;
    readonly row: Row;
    readonly rowIndex: number;
    readonly field: string;
    readonly column: DataGridColumnInfo<Row> | null;
    readonly value: unknown;
    readonly element: HTMLElement;
    readonly nativeEvent: MouseEvent;
}
```

`onCellClick` / `onCellDoubleClick`. `preventDefault()` cancels the built-in action.

Members (12):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row;` |  |  |
| `rowIndex` | `readonly rowIndex: number;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row> \| null;` |  |  |
| `value` | `readonly value: unknown;` |  | The cell value (`valueGetter`, else `field`). |
| `element` | `readonly element: HTMLElement;` |  | The cell element. |
| `nativeEvent` | `readonly nativeEvent: MouseEvent;` |  |  |
| `type` | `type: string;` | inherited | `'sortChange'`, `'beforeSortChange'`, ... |
| `source` | `source: DataGridEventSource;` | inherited |  |
| `defaultPrevented` | `defaultPrevented: boolean;` | inherited | True after `preventDefault()` (before-events and click events). |
| `preventDefault` | `preventDefault: () => void;` | inherited | Before-events and click events: cancels the action (or the built-in behavior). |
