[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ValEdit' (#lcl)

# TValueListEditor.Sort

Sorts column values in the control.

## Declaration

Source position: valedit.pas line 175

`protected procedure TValueListEditor.Sort(`
`ColSorting: Boolean;`
`index: Integer;`
`IndxFrom: Integer;`
`IndxTo: Integer`
`); override; procedure TValueListEditor.Sort(`
`Index: Integer;`
`IndxFrom: Integer;`
`IndxTo: Integer`
`); procedure TValueListEditor.Sort(`
`ACol: TVleSortCol = colKey`
`);`

## Arguments

`ColSorting` |  | Not used n the current implementation.
`index` |  | Ordinal position of the column sorted in the method.
`IndxFrom` |  | Row with the initial value included in the sort.
`IndxTo` |  | Row with the final value included in the sort.

## Arguments

`Index` |  | Ordinal position of the column sorted in the method.
`IndxFrom` |  | Row with the initial value included in the sort.
`IndxTo` |  | Row with the final value included in the sort.

## Arguments

`ACol` |  | Column used for the sort operation.

## Description

Sort is an overloaded procedure used to sort column values in the grid control. The overloaded variants provide different parameters for the sort operation.

ACol is a TVleSortCol value that indicates whether key names or values are sorted in the method. When the variant with aACol is used, the SortColRow method is called to perform the sort.

Index contain the position for the column sorted in the method.

IndxFrom and IndxTo specify the starting and ending row numbers affected by the sort operation. When the variant with column and row indexes is used, the inherited Sort method is called to perform the sort.

Sort hides a visible cell editor during the sort operation. The cell editor is restored (when needed) prior to exiting from the method.

## See also

TVleSortCol |  | Indicates the sort order for items in TValueListEditor.
TCustomGrid.Sort |  | Sorts rows or columns in the grid.
TCustomDrawGrid.SortColRow |  | Sorts the data in a column or row using the specified positions.