Class: cWebHtmlList

Properties  Events  Methods    Index of Classes

Combines the data binding and finding logic of the cWebList with the flexibility and freedom of the cWebHtmlBox



Library: Web Application Class Library

Package: cWebHtmlList.pkg


The cWebHtmlList class combines the data binding and finding logic of the cWebList class with the flexibility and freedom of the cWebHtmlBox class.

It works by defining an HTML template that is used to generate each row in the list. Markers using the object names of the columns specify where values should be placed into the HTML. When the list is filling itself with data it will generate the rows by repeating this template for each row filling in the values from the columns. The list can be data-aware or filled manually, just like the regular cWebList.

An OnRowClick event is available to handle clicks on a specific row and using data-ServerOnElemClick in the HTML clicks on specific HTML elements can be handled. Of course, like with the HTML box, usage of this control requires knowledge of HTML and CSS, but it can provide great flexibility.

Object oWebVendorHtmlList is a cWebHtmlList
    Set psHtmlBefore to '<table>'
    Set psHtmlTemplate to '<tr><td>{{oVendor_Name}}</td><td>{{oInventory_Item_ID}}</td><td>{{oInventory_Description}}</td></tr>'
    Set psHtmlAfter to '</table>'

    Object oVendor_Name is a cWebColumn
        Entry_Item Vendor.Name

    Object oInventory_Item_ID is a cWebColumn
        Entry_Item Inventory.Item_ID

    Object oInventory_Description is a cWebColumn
        Entry_Item Inventory.Description

Drag and Drop Support

This control can be used as a valid drop target by registering it as such in a cWebDragDropHelper object.

The supported actions for this control are:
- C_WebDropOnControl

This allows the control to accept data dragged from elsewhere in the control (if configured that way) and can also be used to accept files when registered within a cWebDragDropFileHelper.