GroupHeader Object

GroupHeader Object

The GroupHeader object represents the header for a grouping of messages within a table view.

At a Glance

Specified in type library:

CDO.DLL

First available in:

CDO Library version 1.1

Parent objects:

Messages collection

Child objects:

(none)

Default property:

Name

Properties

Name

Available since version

Type

Access

Application

1.1

String

Read-only

Class

1.1

Long

Read-only

Count

1.1

Long

Read-only

Level

1.1

Long

Read-only

Name

1.1

String

Read-only

Parent

1.1

Messages collection object

Read-only

Session

1.1

Session object

Read-only

Unread

1.1

Long

Read-only

Methods

(None.)

Remarks

A GroupHeader object is only instantiated when a CDO Rendering TableView is applied to a Messages collection, and furthermore only when this view is a grouped, or categorized, view. The group header indicates that the items following it in the view are grouped within its category. A grouped view is generated externally to the CDO application and cannot be created or deleted programmatically by the application. A rendering application applies the view by assigning it to the CurrentView property of the CDO Rendering ContainerRenderer object. Applying the grouped view causes the underlying collection to be updated with the grouping specified in the view.

Currently, categorized views are only applied to folders, and group headers can only appear in a Messages collection. Address book container views are not grouped.

Not all message store providers support group headers. To do so, a provider must be able to apply a MAPI restriction to the IMAPITable object returned by the RawTable property of the collection being viewed. The private and public message stores included with the Microsoft® Exchange Server support group headers.

Group headers are nonpersistent objects instantiated automatically to represent the categorization rows in a grouped view. They are not stored anywhere. Group headers, like grouped views, cannot be created or deleted programmatically by a CDO application. The only way to create GroupHeader objects is to apply a grouped view to a rendering object. The grouping is specified externally as part of the view, for example by the Microsoft® Exchange Client. A group header is released, with no persistent copy, when its Messages collection is released.

A GroupHeader object corresponds to a categorization row in a MAPI view table. The group header is only needed when you traverse a Messages collection and need to distinguish between categorization and message items. When you render a categorized table with the CDO Rendering ContainerRenderer object, the categorization rows are rendered as well as the messages.

GroupHeader objects are included with Message objects in the Count property of the Messages collection and are accessible through its Item property. They can also be returned by the Messages collection's Get methods.