The TableView object represents a tabular view of an address book container or a folder.
Specified in type library: | CDOHTML.DLL |
First available in: | CDO Rendering Library version 1.1 |
Parent objects: | Views collection |
Child objects: | Columns collection |
Default property: | (none) |
Name |
Available since version | Type |
Access |
---|---|---|---|
Categories | 1.1 | Long | Read/write |
Class | 1.1 | Long | Read-only |
Columns | 1.1 | Column object or Columns collection object | Read-only |
Index | 1.1 | Long | Read-only |
Name | 1.1 | String | Read-only |
Parent | 1.1 | Views collection object | Read-only |
Source | 1.1 | Long | Read-only |
Name |
Available since version | Parameters |
---|---|---|
IsSameAs | 1.1 | varView as Object |
A table view is a specification of a tabular rendering for a container object. The container object can be an address book container or a folder. The table view is applied to the container object in the context of a ContainerRenderer. The container renderer specifies the container object in its DataSource property and the table view to be applied in its CurrentView property.
The table view in turn contains a collection of Column objects. The collection is obtainable from the table view's Columns property. Each Column object specifies a property to be rendered in its Property property and the manner of rendering that property in its RenderUsing property. The display order of the columns is determined by the ordering of the table view's Columns collection. The leftmost column is the one obtained from the collection's Item property with an index value of 1, and the rightmost is obtained with an index value equal to the collection's Count property.
A table view is normally generated externally to a CDO application, although a nonpersistent table view can be created with the Add method of the Views collection. A table view created in this way ceases to exist when the collection is released.
An externally generated table view can specify restrictions, sorting, and grouping. A restriction specifies which entries in the underlying container object are to be rendered. A sort specifies the order in which they are to be rendered. Grouping specifies how the sorted entries are to be categorized in the rendering.
A restriction is based on selected properties of the container object's entries and can be arbitrarily complex. A table view defined on a Messages collection, for example, can restrict the collection so that the only messages rendered are those that were received since December 4, 1997, have not yet been read, and have either a subject starting with "Bonus" or a message text containing "Bonus Calculation".
A table view's sort can be up to four levels deep. Each level corresponds to a property of the entries being sorted.
In addition to restrictions and sorting, a table view can be grouped, or categorized. Like a sort, a grouping can be up to four levels deep. Specifying grouping on a table view generates a sort on the same properties, in the same nesting order, as in the grouping.
If a restricted table view on a Messages collection is also grouped, GroupHeader objects are rendered along with the Message objects. Only the group headers corresponding to the messages that pass the restriction are rendered. AddressEntries collection views are not grouped, and only AddressEntry objects are rendered.