Sorts Task objects.
Syntax:
ActiveGanttVBCtl.Tasks.Sort(PropertyName As String, Descending As Boolean, SortType As E_SORTTYPE, [StartIndex As Long = -1], [EndIndex As Long = -1]
The Sort Method (Tasks Collection) syntax has these parts:
| Part |
Description |
| ActiveGanttVBCtl.Tasks |
An object expression that evaluates to an ActiveGantt Schedule Control's Tasks collection. |
| PropertyName |
A string value that determines the name of the Task object property that you wish to sort by. |
| Descending |
A boolean value that determines the sort order as described in settings. |
| SortType |
A numeric value that determines the casting or conversion that will take place (only for sort purposes) on the value of the property specified by the PropertyName parameter as described in settings. |
| StartIndex |
(optional). A long integer value that determines the index of the first Task object that will be affected by the sort. |
| EndIndex |
(optional). A long integer value that determines the index of the last Task object that will be affected by the sort. |
The settings for Descending are:
| Setting |
Description |
| True |
The objects will be sorted in descending order. |
| False |
The objects will be sorted in ascending order. |
The settings for SortType are:
| Setting |
Description |
| 0 |
(E_SORTTYPE.ES_STRING). Values will be treated as strings for sort purposes. |
| 1 |
(E_SORTTYPE.ES_NUMERIC). Values will be treated as numbers for sort purposes. |
| 2 |
(E_SORTTYPE.ES_DATE). Values will be treated as dates for sort purposes. |
Remarks:
Use this method to change the order of Task objects by sorting on the properties of the Task object.
See Also:
Tasks Property , Add Method (Tasks Collection), Clear Method (Tasks Collection), Count Property (Tasks Collection), Item Property (Tasks Collection), Remove Method (Tasks Collection)