getSortingState()
returns the current state of sorting data in Grid
getSortingState(): object;
Returns:
An object with the current state of sorting data in the grid.
Example
const state = grid.getSortingState();
// -> {dir: "desc", by: "country"}
Related sample: Grid. Get sorting state
The return object includes the following attributes:
dir | (string) the sorting direction (desc, asc) |
by | (string | number) the id of a column that the grid is sorted by |
Change log:
added in v6.4