ADO » DataControl » SortDirection

boolean = datacontrolobject.SortDirection
datacontrolobject.SortDirection = boolean


This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Applications that use RDS should migrate to WCF Data Service.

The SortDirection is deprecated in ADO.

Sets or returns a Boolean value that defines the direction of the sort.

The SortDirection sets or returns a Boolean value that indicates the direction of a sort. If set to True, the sort direction is in ascending order. If set to False, the sort direction is in descending order. If both a filter and sort operation are to occur, the filter will be performed first.

The companion SortColumn property designates the column on which the sort is to be performed.

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.


objDataControl.SortColumn = strSortCol
objDataControl.SortDirection = False

See Also: