Sorts the child items of the given parent item in the control.
|Item as HITEM||A long expression that indicates the item's handle that is going to be sorted.|
|ColIndex as Variant||
A long expression that indicates the column's index or the cell's handle, a string expression that indicates the |
|Ascending as Boolean||A boolean expression that defines the sort order.|
The SortChildren will not recurse through the tree, only the immediate children of item will be sorted. If your control acts like a simple list you can use the following line of code to sort ascending the list by first column: G2antt1.Items.SortChildren 0, 0. To change the way how a column is sorted use SortType property of Column object. The SortChildren property doesn't display the sort icon on column's header. The control automatically sorts the children items when user clicks on column's header, depending on the SortOnClick property. The SortOrder property sorts the items and displays the sorting icon in the column's header. Use the AllowSort property to avoid sorting a column when the user clicks the column.