PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
This content has been translated automatically. Click here to view the French version.
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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" pane, "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
Eventos no Cabecalho Tabela
PROCEDURE WIN_Table_pedido1()

Event("procedure_coluna_numero","TABLE_pedido",1529)

//-------------------------------

PROCEDURE procedure_coluna_numero()

Trace("Coluna Numero: => "+_EVE.wParam
Trace("Nome Procedure: => "+_EVE.name)


//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/04/curso-windev-tabela-025-eve-eventos-no.html
De matos AMARILDO
23 Apr. 2016