Column actions: sort
Data within the flexYgrid can be sorted according to data within given columns.
Although these sorting operations can be, at their simplest, one-click operations, there are many additional options and ways to sort data within the grid.
The following options are available to sort data based on values within given columns:
- 'Sort A to Z': This will arrange the grid according to an A to Z sort order applied on a given column.
- 'Sort Z to A': This will arrange the grid according to an Z to A sort order applied on a given column.
- 'Sort all in alphanumeric order': This option is exclusive to multi-value columns (such as a 'Values' column within scanEZ).
Sort Operations on Grouped Columns
Sorting can be applied on both grouped and non-grouped columns.
When you create a grid grouping, the column you use for the group is automatically sorted.
Here, no grouping is applied. The Value column is sorted, with the option 'Sort all in alphanumeric order' enabled.
The column Type was used to group the grid data.
Note that the A to Z sort order of the data in the Type column is also indicated within the grouped column header itself.
The sort order settings of column groupings and the column data cells are independent, as shown in the example below.
Group Sorting with Totals
The function 'Sort Groupings by Count', activated by clicking its toolbar button or its context menu option found in the 'Grid Tools & Options > Grid Options' submenu, will immediately sort all categories by their entry count.
|NOTE||This function does not require group totals to be set, and can be toggled independently from other group total settings. For more information, see the group totals page.|
The function 'Sort by Group Total', activated by clicking an entry in the dropdown list in its toolbar button or its context menu option found in the 'Grid Tools & Options > Grid Options' submenu, will sort the grid data according to the Group Totalsset in the Grid Manager.
In the example above, the toolbar button's dropdown list indicates which categories have Group Totals set, as well as which, if any, the grid data is currently sorted by. Clicking a different entry in the list will shift the sorting to the newly selected Group Total, and clicking the dropdown list entry again will undo the sorting.
Only 1 sort operation of this type can be active at any given time.
Multi-Level Sorting Operations and Sort Rank
In addition to the independent sort settings between groupings and cell data, you can also sort using multiple different columns. This allows you, for example, to pinpoint specific values, or craft a data layout to your desired specifications.
In the following example, multiple sorting operations have been performed: two grouped columns have been sorted, and two non-grouped column headers have been sorted. The sort rank is indicated by the color-coded number in the screenshot. Color coded arrows are used to indicate the order (based on a standard A to Z sorting, smallest to largest).
The two columns that are grouped are Created and Last Fixup.
Sorting made on these group headers are independent. And, in fact, these two groupings are sorted in two different manners: The grouping for the column Created is sorted A to Z, and thus the dates are earliest to latest going down. In contrast, the grouping for column Last Fixup is sorted in the opposite manner, Z to A, latest to earliest.
These same two columns' non-grouped headers are then sorted using a feature called Sort Rank which lets you perform a sort operations on several columns at once, one after the other. This can be done by holding down 'Shift' while clicking the columns perform the sort operation on—in the order that you want to sort them. Sort rank settings can be changed at anytime via the Grid Manager. A to Z sorting is applied to column Last Fixup, and then Z to A sorting is applied to the column Created.
|NOTE||The same two columns are chosen for visual convenience only, multi-sort operations do not require groupings.|
The end results are best illustrated by the order shown with the yellow arrow, which shows that, for example, the three entries whose Last Fixup value is 12:12:02 PM are additionally sorted latest to earliest by the Created column.