API REFERENCE
getSortModel
Reads current sort columns, directions, and priorities.
What does this API do?
Reads current sort columns, directions, and priorities.
Exact input and result types
getSortModel(): Promise<SortModelEntry[]>| Arguments | Required | Type |
|---|
The return type is Promise<SortModelEntry[]>.
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.
Read related types
Feature explanations and examples
- Single and multiple sorting
Sorting changes display order without modifying data values. Single sorting uses one criterion; multiple sorting uses prioritized criteria.