SortColumn Method

Sorts the DataGrid contents by the specified column.

DataGridObject.SortColumn(ColIndex[, SortOrder])

Client support

   Newlook Smartclient

   Newlook Server

Use

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.

TIP!

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.

Arguments

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.

Constants

The constants for SortOrder are:

Returns

This method returns a boolean value indicating the success or failure of the action.

Applies To

DataGrid control

See Also

ShowColumns property | AllowSort property


© 2004-2021 looksoftware. All rights reserved.