ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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 programmatically
  • Proposing a filter programmatically
  • Don't propose the context menu for implementing a filter on the columns
  • Save filters
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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
Note: These filter options are also available for TreeView Table control fields..
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). All you have to do is right-click the search icon to open the context menu of column:
Filter on a column
For managing the 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.
    Note: The "Is empty" condition filters the column on empty elements.
  • 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:
    • Filters applied when the window is closed will be automatically executed the next time the window is opened..
    • 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 programmatically

Proposing a filter programmatically

TableEnableFilter is used to create a filter on a column programmatically. 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.

Save 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: 09/30/2024

Send a report | Local help