PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • How to run a specific process during a click on the header of a table column?
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 during a click on the header of a table column?
To run a specific process during a click on a table column:
  1. Intercepting the event in the initialization code of the table:
    // Initialization code of the table:
    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>
Notes:
  • To create a local procedure from the code editor, select "Inserter .. New local procedure".To directly create a local procedure from the code editor, on the "Code" pane, in the "Procedures" group, expand "New" and select "New local procedure".
  • The procedure can prevent the column from being sorted if necessary. To do so, all you have to do is insert the following code line:
    _EVE.Return = 0
Minimum required version
  • 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
Apr. 23 2016