# getRowId

Returns a stable, unique row ID. The same business row must retain its ID after sorting, filtering, and editing.

Canonical: https://grid.syidax.com/docs/options/getRowId/

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

## What does this API do?

Returns a stable, unique row ID. The same business row must retain its ID after sorting, filtering, and editing.

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

## Exact input and result types

```typescript
getRowId: (row: Readonly<GridData>) => GridRowId
```

| Item | Value |
| --- | --- |
| JavaScript name | getRowId |
| HTML attribute | get-row-id |
| Default | undefined |
| Input type | (row: Readonly<GridData>) => GridRowId |

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

## Usage flow

Set this on a property of the Grid element. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.

<a id="types"></a>

## Read related types

- [GridData](https://grid.syidax.com/docs/types/GridData.md)
- [GridRowId](https://grid.syidax.com/docs/types/GridRowId.md)

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

## Feature explanations and examples

- [Row selection](https://grid.syidax.com/docs/features/row-selection.md) — Row selection chooses targets for bulk actions such as approval, export, or assignment. Unlike cell range selection, it selects an entire order.
