CurrentView Property (ContainerRenderer Object)

CurrentView Property (ContainerRenderer Object)

Important  The Collaboration Data Objects (CDO) 1.2.1 Rendering objects are not installed by or supported for use with Exchange Server 2003 or later.

The CurrentView property returns or sets the current view used to render an address book container or folder. Read/write.

Syntax

Set objView = objContRend.CurrentView

Set objContRend.CurrentView = objNewView

objContRend.CurrentView = index

objContRend.CurrentView = name

objView

On successful return, contains the TableView object that is currently applied to the container object being rendered.

objContRend

Required. The ContainerRenderer object.

objNewView

Object. The view that is to become current.

index

Integer. An index into the container renderers Views collection ranging from 1 to the collections Count property.

name

String. The display name of an individual TableView object in the container renderers Views collection.

Data Type

TableView object

Remarks

The view object must be a view in the container renderers Views collection. This collection can be accessed with the container renderers Views property. If you attempt to set the current view with a view object that cannot be found, for example if the index is out of range or there is no view with the specified name, the current view remains unchanged.

If you use the index parameter, the TableView object occupying the indicated position in the Views collection becomes the current view.

If you use the name parameter, the first view object in the collection having a matching value in its Name property becomes the current view.

Setting the CurrentView property applies the view to the container object specified in the DataSource property. If the new view is a table view, its Columns collection becomes available through the TableView objects Columns property. For more information, see Rendering Container Objects.

Setting the CurrentView property also causes the underlying AddressEntries, Messages, or Recipients collection to be repopulated. This means that the collection is altered to contain only the items passing the new views restriction, sorted and grouped as specified by the new view. The collections Count property is also refreshed, and access to its members through the Item property reflect the new sort order.

Repopulating the collection also means that the filter is inherited from the new view, and the AddressEntryFilter or MessageFilter object is revised to reflect the new views restriction. Any previous settings of the filter are ignored.

If you change the CurrentView property or alter the collections filter during execution of an indexed loop, the index reverts to 1 in your next iteration of the loop, and the repopulated collection is accessed starting with the first member according to the new restriction and sort specification.

A newly instantiated Views collection always has a default current view. This default can be specified by the directory server or message store underlying the container object. If it is not specified, the CDO Rendering Library sets it to the first view in the Views collection.

See Also

Concepts

ContainerRenderer Object