The following sections describe web controls related to tables.

WebTableControl

The WebTable control is used for the following purposes:

To represent a container used for page structure

To represent a data table made up of repeated rows with fixed columns

A control defined as a direct child of the table is considered a child of a container (similar to div or span), and will be not be available in the row member of the table. The Row element (in the Repository) allows you to define the row structure of a table. A control defined under the Row element will not be available as a child of the table, but rather as an element on each row returned by the Rows collection. The Column attribute can be used to identify the column in which to search for a control defined under the Row element. The Column attribute is numeric.

The following example presents a Repository definition for a button (abutton) that is a child of the container:

<WebTableControl>

    <Button ProgId="aButton" Id="theButton"/>

</WebTableControl>

In the next example, a control (acheckbox) that appears in the rows of the second column of a data table is defined:

<WebTableControl>

    

    <Row>

        <WebCheckBoxControl ProgId="aCheckBox" Class="cbx20" Column="2"/>

    </Row>

     

</WebTableControl>

HTML Tags

table

Members

Member  Name

Type

Description

Rows

ICollection<WebTableRow>

Returns a collection of rows. Each row is of a generated type, including the children defined in the Repository.
If no Row element is defined in the Repository, each row will be a standard WebTableRow with no defined children.

Header

ICollection<WebControl>

Returns the header row of the table. This is either the <th> or, if no <th> exists, the first <tr> of the table.

HeaderParentSelector

String

Sets a selector to find the actual parent of the header when the header is not a child of the current table.

HeaderInBody

Boolean

Indicates whether the header of the table is in the thead or the tbody of the table. The default value is false (header is in the thead).

HeaderRowIndex

Integer

The row of the actual header columns. The default value is 0.

FirstRowIndex

Integer

Index of the first row in the table that contains data. The default value is 0.

TableText

List<List<string>>

Gets all the data in a table. The table rows are returned in a list of lists:
Public List<List<string>> TableText

Note: The actual first row of the table is calculated based on all the above attributes. If FirstRowIndex is set, its value will be used with no additional calculations. If neither FirstRowIndex nor HeaderParentSelector is set, and HeaderInBody is set to true, then the first data row will be calculated as HeaderRowIndex +1.

WebTableRowControl

This general control allows you to use a free form definition for table rows.

Members

Member  Name

Type

Description

Columns

ICollection<WebControl>

Returns a collection of columns.