PROPERTY:  DataControl::SortColumn

datacontrolobject.SortColumn = string

The SortColumn property sets a string value that identifies which column to sort. This can be either the name or alias of the column.

All pending changes need to be saved before you do a sort. For an ADO Recordeset object, use the UpdateBatch method. For a RDS DataControl object, use the SubmitChange method. If both a filter and sort operation are to occur, the filter will be performed first.

The companion SortDirection property designates if a sort will be in ascending or descending order.

In order to implement the sort, or if you change the values of either the SortDirection or SortColumn properties, you need to call the Reset method. When you call Reset, if both the filter and sort properties are in effect, the filtering will occur first followed by the sorting.

Code (VBScript):
objDataControl.SortColumn = strSortCol
objDataControl.SortDirection = False
objDataControl.Reset

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information