|
|
Sorting
| Methods: |
Sort, ResetSort |
| Properties: |
Column.SortOrder, Column.SortType, Column.AllowSort, AutoSort, NextSortOrder |
Setting the sorting properties of the column
Prepare the first column for sorting:
Set col = grid.Column("A")
' allow sorting for this column
col.AllowSort = true
' get the sort priority for this column
col.SortOrder = grid.NextSortOrder
' set the type of sorting
col.SortType = SortType_Ascending
|
|
Sorting, automatic mode
Note that the column has a string data type as default. To sort rows as numbers, set the appropriate data type for the column. Now sort the grid:
To sort the grid automatically, set AutoSort to true:
Resetting sort settings
To reset all sort settings for all columns, use the ResetSort method:
|