Sorting Collections
When you retrieve a collection of records, you often sort them according to the contents of one field. You can sort based on the contents of a column in a grid, or on the value of information displayed in a field
To sort a collection based on the contents of a grid column, double-click the column heading for the column. To toggle the sort between ascending order and descending order, repeat this action.
To sort a collection based on a field value: