Skip to content

OnClick - cWebColumnImage

Triggered when the user clicks on an image in the column

Type: Event

Parameters

Parameter Type Description
sImage String - The image URL or the image CSS Class name of the image that was clicked
sRowId String The RowId of the row that was clicked

Syntax

Procedure OnClick String sImage 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 images.

There are two parameters passed to this event:

sImage

The sImage parameter is either the URL or the CSS Class name for the image. The column's pbImageByCSS property determines whether the image is specified via its URL or a CSS class name.

When the column supports multiple-dynamic images (pbDynamic = True), then you can use the sImage parameter to identify which image in the row was clicked. If the column only supports one static image (pbDynamic = False) then this parameter can be ignored. The image name is is assigned when calling the AddImage method.

sRowID

The sRowID parameter is the unique row identifier of the row that was clicked.

Sample

Object oStaticImageCol is a cWebColumnImage
    Set piWidth to 20
    Set psImageUrl to "Images/clip.png"
    Set pbServerOnClick to True

    Procedure OnClick String sImage String sRowId
        Forward Send OnClick sImage sRowId
        Send ShowInfoBox ("You've clicked the image:" * sImage)
    End_Procedure
End_Object

DeserializeRowId deserializes a RowId string into a RowId type and SerializeRowId serializes a RowId type to a string.

See Also

psClientOnClick