AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Columna de tabla
  • 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
Versión mínima requerida
  • Versión 10
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/05/2022

Señalar un error o enviar una sugerencia | Ayuda local