Skip to content

pbDynamic - cWebColumnImage

Controls whether the column can display a variable set of images 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 Images

When pbDynamic is set to False (the default), the cWebColumnImage class is designed to display a single (static) image on each row.

Set the psImageURL property to specify the static image to display on each row. Alternatively, the static image can be specified using CSS, see pbImageByCSS for more information.

Implement the OnClick event handler to perform a server action when the button is clicked.

Dynamic Images

When pbDynamic is True, a variable set of dynamic images can be displayed for each row. In this case, the OnDefineImages event will be triggered in this object for every row of data that is sent to the grid.

Implement the OnDefineImages event to define the set of images to be displayed on each row. Inside OnDefineImages you will send the AddImage message for each image you wish to define for a given row of this column.

Implement the OnClick event handler to perform a server action when the image is clicked. An image identifier will be passed to this event to identify which image in the image set was clicked.

Object oDynamicImageCol is a cWebColumnImage
    Set piWidth to 20
    Set pbDynamic to True
    Set psCaption to "Icons"
    Set pbServerOnClick to True

    Procedure OnDefineImages
        Forward Send OnDefineImages
        Send AddImage "Images/Order.png"

        If (Customer.Balance > 4000) Begin
            Send AddImage "Images/Attention.png"
        End
    End_Procedure

    Procedure OnClick String sImage String sRowId
        Forward Send OnClick sImage sRowId
        Send ShowInfoBox ("You've clicked on image '" + sImage + "'!")
    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.

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.