# DataGridCellContext (@salmonui/data-grid)

> The DataGridCellContext interface of @salmonui/data-grid.

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

```ts
import type { DataGridCellContext } 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 DataGridCellContext<Row> {
    row: Row;
    rowId: RowId;
    field: string;
    column: DataGridColumnInfo<Row>;
    value: unknown;
    formattedValue: string;
    rowIndex: number;
    selected: boolean;
    editing: boolean;
    tree?: DataGridTreeContext;
}
```

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `row` | `row: Row;` |  |  |
| `rowId` | `rowId: RowId;` |  |  |
| `field` | `field: string;` |  | The column key (column `id`, else `field`). |
| `column` | `column: DataGridColumnInfo<Row>;` |  |  |
| `value` | `value: unknown;` |  |  |
| `formattedValue` | `formattedValue: string;` |  |  |
| `rowIndex` | `rowIndex: number;` |  |  |
| `selected` | `selected: boolean;` |  |  |
| `editing` | `editing: boolean;` |  |  |
| `tree` | `tree?: DataGridTreeContext;` | optional | Tree mode, the tree column's cells only: depth, children, expansion and child load status. |
