ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Automatic Application Features (AAF) / AAF on Tables/TreeView Tables
  • Overview
  • Sorting the columns (AAF)
  • Simple sort
  • Multiple sort
  • Remember sorts
  • Development and programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
WINDEV allows the user to easily sort the columns of a Table control.
The sorts can also be performed through programming.
Remark: 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 indicates the sort direction for the column.
Tip: To implement this feature, "Sortable" must be checked in the "General" tab of the description window of column.

Multiple sort

To sort the content of a Table control on several columns, the user must:
  1. Hold the Ctrl key down.
  2. 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.
Remark: The multiple sort is available for the memory Table controls only.

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:
  1. Open the context menu of the sort column of the Table control. For more details, see Context menu of columns.
  2. 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 is used to get and change 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.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 10/14/2022

Send a report | Local help