|
|
|
|
|
- How to run a specific process when the header of a column in a Table control is clicked on?
Defining columns of Table controls programmatically
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: - 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. - 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:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|