pbDynamic - cWebColumnButton
Controls whether the column can display a variable set of buttons for each row
Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None
Syntax
{ WebProperty=Client }
Property Boolean pbDynamic
| Access Type | Syntax |
|---|---|
| Read Access: | WebGet pbDynamic to BooleanVariable |
| Write Access: | WebSet pbDynamic to BooleanVariable/Value |
Description
Static Buttons
When pbDynamic is set to False (the default), the cWebColumnButton class is designed to display a single (static) button on each row. A static button will be created automatically for each row.
Set the psButtonCaption property to set the caption displayed in the static button.
Implement the OnClick event handler to perform a server action when the button is clicked.
Dynamic Buttons
When pbDynamic is True, a variable set of dynamic buttons can be displayed for each row. 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.
Implement the OnClick event handler to perform a server action when the button is clicked. A button identifier will be passed to this event to identify which button in the button set was clicked.
Object oDynamicBtnCol is a cWebColumnButton
Set piWidth to 80
Set pbDynamic to True
// Called for each row to define the buttons that need to be displayed.
Procedure OnDefineButtons
// Use AddButton to define a button (sID, sCaption, sCSSClass)
Send AddButton "E" "Edit" ""
// The Global buffer contains the right record for data aware lists
If (Customer.Status = "Y") Begin
Send AddButton "D" "Deactivate" ""
End
End_Procedure
Procedure OnClick String sButton String sRowId
Forward Send OnClick sButton sRowId
If (sButton = "E") Begin
Send ShowCustomer sRowId
End
Else If (sButton = "D") Begin
Send DeactivateCustomer sRowID
End
End_Procedure
End_Object
About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.
See Also
About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.