Sorts opened dataset on client side without refetching data from server.
Call SortBy to sort dataset by particular fields on client side. Field names are case-sensitive and separated by commas. Every field name can be followed by the keyword 'ASC' or 'DESC' to specify a sort direction for the field. If one of these keywords is not used, the default sort direction for the field is ascending ('ASC').
This method affects dataset order only when it is opened, i.e. when Active = True.
The given names are treated like identifiers in an SQL command, that is, they are downcased unless double-quoted.
This code can be used to sort data in TDBGrid component by particular column when user clicks on its title.