ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Table Column control
  • How to run a specific process when the header of a column in a Table control is clicked on?
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
How to run a specific process when the header of a column in a Table control is clicked on?
To run a specific process when a column of a Table control is clicked on:
  1. Intercepting the event in the initialization code of the Table control:
    // Table control "Initializing" event:
    Event("CLICK_COLUMN_HEADER", "TABLE1", 1529)

    In this code, "TABLE1" corresponds to the name of the Table control.
  2. Procedure used to intercept the click on the column header. In this procedure, you have the ability to retrieve the number of the column that was clicked by the user.
    // Code of CLICK_COLUMN_HEADER procedure
    PROCEDURE CLICK_COLUMN_HEADER()
    Trace("We've clicked the header of column # " + _EVE.wParam)
     
    // <Your specific process>
Remarks:
  • To create a local procedure from the code editor, go to the "Code" tab, "Procedures" group, expand "New" and select "New local procedure".
  • The procedure can prevent the column from being sorted if necessary. To do so, simply insert the following line of code:
    _EVE.Return = 0
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help