Parameter | Description |
---|---|
sRowId | RowId of the clicked element |
sParam | The value of the data-ServerOnElemClick |
Procedure OnElemClick String sRowId String sParam
This event is called when an element is clicked within a row that has the data-ServerOnElemClick attribute set on it.
The example below shows how data-ServerOnElemClick is set and OnElemClick is implemented to handle the click event.
Object oWebVendorHtmlList is a cWebHtmlList Set psHtmlBefore to '<table>' Set psHtmlTemplate to '<td><td>{{oVendor_Name}}</td><td>{{oInventory_Item_ID}}</td><td>{{oInventory_Description}}</td><td><a data-ServerOnElemClick="Details">Details..</a></tr>' Set psHtmlAfter to '</table>' Object oVendor_Name is a cWebColumn Entry_Item Vendor.Name End_Object Object oInventory_Item_ID is a cWebColumn Entry_Item Inventory.Item_ID End_Object Object oInventory_Description is a cWebColumn Entry_Item Inventory.Description End_Object Procedure OnElemClick String sRowId String sParam Send ShowInfoBox (SFormat("Clicked %1 on row %2", sParam, sRowId)) End_Procedure End_Object