Retrieves or sets a value indicating whether the sort icon is visible on column's
header, while the column is sorted.
Type | Description | |||
Boolean | A boolean expression indicating whether the sort icon is visible on the column's header, while the column is sorted. |
Use the DisplaySortIcon property to hide the sort icon. Use the SortOnClick property of control to disable sorting columns by clicking in the column's header.
The control automatically sorts a column when the user clicks the column's header, if the SortOnClick property is exDefaultSort. If the SortOnClick property is exNoSort, the control disables sorting the items when the user clicks the column's header. There are two methods to get the items sorted like follows:
Using the SortOrder property of the Column object. The SortOrder property displays the sorting icon in the column's header if the DisplaySortIcon property is True:
ComboBox1.Columns(ColIndex).SortOrder = SortAscending
Using the SortChildren method of the Items object. The SortChildren sorts the items. The SortChildren method sorts the child items of the given parent item in the control. SortChildren will not recourse through the tree, only the immediate children of Item will be sorted. The following sample sort descending the list of root items on the "Column 1"( if your control displays a list, all items are considered being root items ).
ComboBox1.Items.SortChildren 0, "Column 1", False