# getSortModel

Reads current sort columns, directions, and priorities.

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

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

## What does this API do?

Reads current sort columns, directions, and priorities.

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

## Exact input and result types

```typescript
getSortModel(): Promise<SortModelEntry[]>
```

| Arguments | Required | Type |
| --- | --- | --- |

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

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

## Usage flow

After registering and initializing the Grid element, call grid.getSortModel(…). 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

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

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

## Feature explanations and examples

- [Single and multiple sorting](https://grid.syidax.com/docs/features/sorting.md) — Sorting changes display order without modifying data values. Single sorting uses one criterion; multiple sorting uses prioritized criteria.
