ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Table control
  • Overview
  • How to?
  • Filter on a column
  • Managing the filters through programming
  • Proposing a filter through programming
  • Don't propose the context menu for implementing a filter on the columns
  • Storing filters
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
The user can filter the content of a Table control by displaying the records corresponding to a condition for example.
Table control filter options
Remark: These filter options are also available for TreeView Table controls.
How to?

Filter on a column

This feature is automatically implemented in Table controls populated programmatically and in Table controls based on a data file, for columns with search (magnifier displayed in the column). Simply right-click the search icon to open the context menu of the column:
Filter on a column
For managing filters, this context menu proposes:
  • to implement a filter ("Filter"):
    To do so, select a condition and type the requested value. The content of the Table control is filtered according to the specified condition.
    Remark: The "Is empty" condition is used to display only empty elements in the column.
  • to set a filter with one of the values in the column.
  • to delete a filter that was previously set on the column ("Delete filter").
  • to remember filters ("Remember filters").
    If this option is enabled:
    • the filters implemented when closing the window will be automatically run during the next window opening.
    • A short message will be displayed to inform the user and to indicate the filters that are set.
      • The display duration of this message can be configured by AAFConfigure.
      • The toast does not lock the application and can be closed with a simple click.
Remarks:
  • The context menus displayed when you right-click the column title and the search icon are different. For more details on the options of this context menu, see Context menu of columns.
  • In a multilingual application, you have the ability to translate the context menu, see Configuring the menus of AAFs.
Managing the filters through programming

Proposing a filter through programming

TableEnableFilter is used to create a filter on a column through programming. This filter can be disabled by TableDisableFilter.
TableFilteredColumn returns the list of columns filtered by the user.

Don't propose the context menu for implementing a filter on the columns

To avoid proposing the context menu for implementing a search and a filter on the columns, use AAFDisable associated with the aafFilter constant.

Storing filters

The StoreFilterAAF property is used to determine and specify if the filters set by the user on a Table control are saved when an application is closed and opened again.
When AAFConfigure is used with the aafToastDurationRestoreFilter constant, it allows you to define the amount of time a toast message appears on the screen to indicate the users that a filter has been set.
If you don't want to show the "Remember filters" and "Remember sorts" options in the context menu, simply use AAFDisable with the aafSaveFilterAndSort constant.
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 10/18/2022

Send a report | Local help