# selectRows

Sets selection for specified row IDs. Use stable IDs, not display indices.

Canonical: https://grid.syidax.com/docs/methods/selectRows/

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

## What does this API do?

Sets selection for specified row IDs. Use stable IDs, not display indices.

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

## Exact input and result types

```typescript
selectRows(ids: Array<string | number>): Promise<void>
```

| Arguments | Required | Type |
| --- | --- | --- |
| ids | Required | Array<string \| number> |

The return type is `Promise<void>`.

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

## Usage flow

After registering and initializing the Grid element, call grid.selectRows(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

<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.
