ComponentOne DataObjects for .NET
Table View Fields
DataObjects for .NET (Enterprise Edition) > Schema Objects > Table Views > Table View Fields

Table view fields (TableViewField objects) define the structure of a table view row. A table view field is either based on a table field (a field of the table on which this TableView is based, according to its Table property), or it is a calculated (unbound) field.

By default, table view fields are in one-to-one correspondence with table fields. To customize the table view Fields collection, right-click a table view and select Fields from the context menu that appears; this will open the Fields dialog box. In the Fields dialog box you can add new fields, including unbound (calculated) fields, you can also delete fields and re-arrange their order (note that primary key fields can be deleted; primary key table view fields are always present to ensure that the table view has proper primary key). The Fields dialog box also allows you to set properties for table view fields. If you want to restore the collection of table view fields to its initial state, select the table view, right-click a table view and select Retrieve Fields from the context menu.

In addition to fields based on table fields, a table view can contain unbound (calculated) fields. A table view field is unbound if its TableField property value is empty. Unbound fields are usually calculated either by Calculations (expressions) or in code. Unbound field values are stored in table view rows; for more information, see Structured Data Storage: Tables and Table Views. To create an unbound field, click the Add button or select Add from the context menu in the Fields list.

A table view field has a name that must be unique in the table view. It has the same function as the table field name (for more information, see Table Fields). A field can be renamed by renaming the field node in the Fields list.

TableViewField properties are the same as the properties of a simple table field (see Table Fields), except some field properties do not apply to table view fields; for example, properties controlling database update, such as UpdateIgnore, UpdateSet, and so on do not apply to table view fields and are hidden. Table views do not participate in updating the database (see How the Data is Modified). An unbound (calculated) table view field's properties have exactly the same meaning as table field properties (see Table Fields). A bound table view field's (one based on a table field) properties have some special inheritance-like features: