# setCanonicalRanges

Changes cell selection from normalized range input and returns the change result.

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

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

## What does this API do?

Changes cell selection from normalized range input and returns the change result.

API for Pro features: Cell range selection

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

## Exact input and result types

```typescript
setCanonicalRanges(ranges: SyGridCellRangeInput[]): Promise<SyGridCanonicalChange[]>
```

| Arguments | Required | Type |
| --- | --- | --- |
| ranges | Required | SyGridCellRangeInput[] |

The return type is `Promise<SyGridCanonicalChange[]>`.

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

## Usage flow

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

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

## Read related types

- [SyGridCellRangeInput](https://grid.syidax.com/docs/types/SyGridCellRangeInput.md)
- [SyGridCanonicalChange](https://grid.syidax.com/docs/types/SyGridCanonicalChange.md)

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

## Feature explanations and examples

- [Cell range selection](https://grid.syidax.com/docs/features/range-selection.md) — A cell range is a rectangle spanning rows and columns. It defines the scope for copying, pasting, filling, and chart creation; selecting it does not change values.
