Skip to content

AddButton - cWebColumnButton

Adds a dynamic button to the column for a particular row

Type: Procedure

Parameters

Parameter Type Description
sId String A unique name for the dynamic button. The name is used to identify the button from other dynamic buttons in the same object on the same row. The sID identifier only needs to be unique within a given row. You can re-use the same identifier on each row.
sCaption String The caption text to be displayed on the button.
sCssClass String [optional] CSS class to be applied to the button.

Syntax

Procedure AddButton String sId String sCaption String sCssClass

Call Example

Send AddButton sId sCaption sCssClass

Description

You must set pbDynamic to True to enable the column for dynamic buttons. In this case, the OnDefineButtons event will be triggered in this object for every row of data that is sent to the grid.

Implement the OnDefineButtons event to create the set of buttons to be displayed on each row. Inside OnDefineButtons you will send the AddButton message for each button you wish to add for a given row of this column.

The sID parameter that you pass to AddButton will be returned to the OnClick event when that button is clicked. You can then use this value to identify which button was clicked in the button set for that row.

See OnDefineButtons for an example of how to call AddButton within the OnDefineButtons event.

See Font Icon CSS Class Styles for predefined button icons you can use.

Note that the parameter order of AddButton is slightly differrent than that of OnManualLoadData, which uses a tWebRow array.