OnClick - cWebColumnButton
Triggered when the user clicks on a button in the column
Type: Event
Parameters
| Parameter | Type | Description |
|---|---|---|
| sButton | String | Name of the clicked button (for multiple buttons) |
| sRowId | String |
Syntax
Procedure OnClick String sButton String sRowId
Description
The OnClick event is sent to the server when the column's pbServerOnClick property is True and the user clicks on one of the column's buttons.
There are two parameters passed to this event:
-
The sButton parameter is a unique name of the button. When the column supports multiple-dynamic buttons (pbDynamic = True), then you can use the sButton parameter to identify which button in the row was clicked. If the column only supports one static button (pbDynamic = False), then this parameter can be ignored. The button name is the name it is assigned when calling the AddButton method.
-
The sRowID parameter is the unique row identifier of the row that was clicked.
Sample
// Shows the customer dialog passingthe customer RowId.
Procedure ShowCustomer String sRowID
Send PopupCustomerDialog of oDemoCustomerDialog sRowID
End_Procedure
Object oSingleBtnCol is a cWebColumnButton
Set piWidth to 35
Set psCaption to ""
Set psButtonCaption to "Edit"
Set pbRender to False
Procedure OnClick String sButton String sRowId
Send ShowCustomer sRowId
End_Procedure
End_Object
When working with manually loaded lists, you may need access to the full set of list data. You can call ProcessDataSet to do so.
DeserializeRowId deserializes a RowId string into a RowId type and SerializeRowId serializes a RowId type to a string.
See Also