Sorting Overview
- 2 minutes to read
#Overview
A grid's data can be sorted by an unlimited number of columns. To sort data against a column or to change a column's sort order an end-user can click its header. The column's current sort order is indicated by the sort glyph (a small arrow displayed at the column header's right edge). If the data is sorted in ascending order, the sort glyph represents an up-arrow. When sorting is in descending order, the sort glyph is displayed as a down-arrow.
If sorting isn't applied, clicking the column's header sorts data by its values in ascending order. If sorting is already applied to the column, subsequent clicks reverse the current sort order. A regular click on a column header clears the sort settings of all other columns. To preserve existing sort settings of other columns, hold the SHIFT key down while clicking. This can be useful when it is needed to sort against multiple columns.
To clear a column's sorting, click its header while pressing the CTRL key.
#Availability
To allow end-users to sort data, set the View's DataViewBase.AllowSorting property to true. Individual columns provide the ColumnBase.AllowSorting property, allowing the default behavior specified by the view to be overridden. For example, this prevents an end-user from sorting data by values of individual columns.
Sorting in code is always allowed.
#Concepts
- Sorting Modes and Custom Sorting
- Sorting Group Rows by Summary Values
- Sorting in Code
- End-User Capabilities - Sorting