JVCL Help:TJvStringGrid.SortGrid
JVCL Help: TJvStringGrid.SortGrid Method
Search in JVCL Help
Search in all projectsSummary
Sorts the rows in the grid.
Pascal
procedureSortGrid(Column: Integer; Ascending: Boolean = True; Fixed: Boolean = False; SortType: TJvSortType = stClassic; BlankTop: Boolean = True);
Parameters
Parameters | Description |
Column: Integer | Specifies the index of the column to use for the sort. |
Ascending: Boolean = True | Indicates the sort order. |
Fixed: Boolean = False | Indicates whether to include the fixed rows in the sort. |
SortType: TJvSortType = stClassic | Specifies the comparison function. |
BlankTop: Boolean = True | Indicates whether to move blank cells before the sort. |
Description
Call SortGrid to sort the rows in the grid on the value of the string in the column specified by Column.
Set Ascending to True for an ascending sort, set Ascending to False for a descending sort.
Set Fixed to True to include the fixed rows in the sort. Set Fixed to False to exclude the fixed rows in the sort.
Set BlankTop to True to move the rows with blank cells at the column with index Column before the sort, and exclude them from the sort. If Ascending is True, the rows will be moved to the top of the grid. If Ascending is False, the rows will be moved to the bottom of the grid. Set BlankTop to False to include the rows with blank cells at the column with index Column in the sort.
SortGrid uses the comparison function specified by SortType. SortType can have any of the following values:
Value | Meaning |
stAutomatic | The comparison function automatically determines the type of the strings when comparing two strings. If both strings represent an integer, floating-point value or a date, then the two strings are compared as integer, floating-point value or data, respectively. Otherwise the two strings are compared as string. |
stClassic | The strings in the sort column are sorted without case-sensitivity. |
stCaseSensitive | The strings in the sort column are sorted with case-sensitivity. |
stNumeric | A numeric sort is used. Every string in the sort column, that is included in the sort, must represent a floating-point value. |
stDate | A date sort is used. Every string in the sort column, that is included in the sort, must specify a date. |
stCurrency | A currency sort is used. Every string in the sort column, that is included in the sort must represent a currency value. |
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page