|
|
|
|
|
- Overview
- Sorting the columns (AAF)
- Simple sort
- Multiple sort
- Remember sorts
- Development and programming
FAA: Sort on Table Columns
WINDEV allows the user to easily sort the columns of a Table control. The sorts can also be performed programmatically. Note: These operations can also be performed on a TreeView Table control.. Sorting the columns (AAF) Simple sort To sort the columns of a Table control, the user must click the title of the column. The sortable columns are identified by a double arrow. When the sort is enabled, a small arrow icon indicates the column sort direction. Tip: To add this functionality, check the "Sortable" option in the "General" tab of the column description window. Multiple sort To sort the content of a Table control on several columns, the user must: - Hold the Ctrl key down.
- Click the title of columns that will be taken into account for the sort. The columns must be selected according to the requested order. For example, to sort by company and by name, you must click the "Company" column and then the "Name" column.
Note: Multiple sorting is only available on Memory Table fields. Remember sorts When one or more sorts have been performed by the user on the columns of a Table control, these sorts can be stored in order for these sorts to be applied by default. To enable this feature, you must: - Open the context menu of the sort column of the Table control. For more details, see Context menu of columns.
- Select "Store the sorts".
Development and programming When creating a Table control: To make a column sortable, all you have to do is select "Sortable" in the "General" tab of the description window of the column. Through programming: - To sort the content of a Table control, all you have to do is use TableSort.
- TableSortedColumn returns the list of sorted columns in the Table control.
- The StoreSortAAF property is used to determine and specify if the sorting order defined by the user on a Table or TreeView Table control is kept when an application is closed and opened again.
- The SortOption property gets and sets the sorting options in the columns of a Table control.
- The Sortable property is used to know whether a column is sortable and to columns sortable.
- If you don't want to show the "Remember filters" and "Remember sorts" options in the context menu, simply use AAFDisable (or DisableAAF) with the aafSaveFilterAndSort constant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|