Platform SDK: CDO 1.2.1 |
You must set the correct kind of data source—an object or a collection—when rendering an individual object or a collection.
To render a collection, use a ContainerRenderer object. A valid data source for a ContainerRenderer would be a Folders collection or a Messages collection. Collection objects can be CDO AddressEntries, Folders, Messages, or Recipients collections.
In contrast, the ObjectRenderer object renders properties on a single MAPI object. It can take any of the following objects as a valid DataSource: AddressEntry, Attachment, Folder, InfoStore, Message, and Session.
Because of similarly named objects, take care when setting the DataSource. You can pass a folder object as the DataSource on the ObjectRenderer object but if you pass it as the DataSource on a ContainerRenderer object, the call will fail. However, you can pass either Folder.Folders or Folder.Messages to the ContainerRenderer object because they are collection objects.