The following example shows how sort the view by column 'name' ascending. Sorting a column ascending is the default behavior, it needs not to be set explicitly:
JamSystemShellView.SortBy := TShellColumns.Name;
The following example shows how sort the view by column 'name' descending:
JamSystemShellView.SortBy := TShellColumns.Name; JamSystemShellView.SortDirection := sdDescending;