Platform SDK: CDO 1.2.1 |
The Render method renders the specified rows of a container object.
strHTML = objContRend.Render(iStyle [, varPageNo] [, varboolRaw] [, varResponseObject] )
iStyle setting | Value | Data source | Objects rendered |
---|---|---|---|
CdoFolder Contents |
1 | AddressEntries, Messages, Recipients |
Address entries, group headers and messages, or recipients, but not child folders |
CdoFolder Hierarchy |
2 | Folders, Messages |
Child folders, but not address entries, group headers, messages, or recipients |
The iStyle parameter applies to all container objects. You must set it to correspond to the value of the DataSource property. If you set it incorrectly, for example to CdoFolderHierarchy for a Recipients collection, or if you do not set it, Render returns CdoE_INVALID_PARAMETER.
Normally only enough rows to fill one frame should be rendered in one call to the Render method. The programmer can control this by setting the RowsPerPage property. Note that the appropriate number of rows depends on several factors, including the frame size, the font size, what other items are being displayed together with the table tows, and download time to the browser.
The HTML output of the Render and RenderHeading methods is treated as two separate tables, one for the header row and one for the container contents rows. The TablePrefix and TableSuffix property strings are inserted around each of these tables.
If the container contains 40 messages, this code fragment processes them in three renderings:
Dim pStart As Long ' current starting page Dim rType As Integer ' type of rows to be rendered Dim objResp As Object ' Active Server response object ' assume ContainerRenderer object already defined and initialized objContRend.RowsPerPage = 15 ' 15 rows might fit reasonably in a frame rType = CdoFolderContents ' ... pStart = 1 objContRend.Render rType, pStart, , objResp ' pStart = 2 on return objContRend.Render rType, pStart, , objResp ' pStart = 3 on return objContRend.Render rType, pStart, , objRes) ' pStart = 3 on return