Skip to main content

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

var 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) the id of a column that the grid is sorted by

Change log:

added in v6.4