RealGrid2 Guide
Column
Data Sorting

Sorting data

If grid SortingOptions.enabled is true and sortable of the column is true, the user can click the column header to sort the dataset based on the field values referenced by the column. can. Additionally, you can specify the sorting method for multiple fields by setting sortingOptions.style.

Setting whether all columns can be sorted

If you set the SortingOptions.enabled value to false, users will not be able to sort any column.

gridView.sortingOptions.enabled = false;
 
gridView.sortingOptions.enabled = true;

Specifies whether to sort a specific column

Let's specify whether the product number can be sorted.

gridView.columnByName("ProductId").sortable = false;
 
gridView.columnByName("ProductId").sortable = true;

Sort styling

Specifies the method of specifying the sort status for multiple columns in the grid.

NONE : No sorting.
EXCLUSIVE: Sort by the last clicked column.
INCLUSIVE: Sorts the column you clicked on first in order.
REVERSE: Sorts the last clicked column first.

gridView.sortingOptions.style = "none";
 
gridView.sortingOptions.style = "exclusive";
 
gridView.sortingOptions.style = "inclusive";
 
gridView.sortingOptions.style = "reverse";