PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • 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 on the company then on the name, you must click the "Company" column first then the "Name" column.
Remark: The multiple sort is available for the memory Table controls only.
Versions 17 and later

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. Display the popup menu of the sort column of the Table control. For more details, see Popup menu of columns.
  2. Select "Store the sorts".
New in version 17

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. Display the popup menu of the sort column of the Table control. For more details, see Popup menu of columns.
  2. Select "Store the sorts".

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. Display the popup menu of the sort column of the Table control. For more details, see Popup 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 Property StoreSortAAF allows to know and to indicate if the sorting done by the user on an Table control or a hierarchical table is kept between 2 launches of the application.
  • The SortOption property is used to get and modify the sorting options in the columns of a Table control.
  • Sortable is used to find out whether a column is sortable and to make a column sortable or not.
  • 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