Sorts the DataGrid contents by the specified column.
DataGridObject.SortColumn(ColIndex[, SortOrder])
Newlook Smartclient
Newlook Server
This method is the equivalent of clicking on a column header of a column which has sorting enabled. If the SortOrder parameter isn't specified, SortAscending is assumed.
The SortColumn method will fail if either the ShowColumns property of the DataGrid or the AllowSort property of the specified column are set to false.
ColIndex - (Integer, Required)
The index of the column that you want to sort by.
SortOrder - (Integer, Optional)
A value which specifies the sort order, see constant list below.
The constants for SortOrder are:
This method returns a boolean value indicating the success or failure of the action.
The following example sorts the grid by the currently selected column in ascending order: VB SCRIPT:Sub SortByType
End Sub |
ShowColumns property | AllowSort property
© 2004-2021 looksoftware. All rights reserved.