Поделиться через


ViewBody Element (View)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Defines how the rows of data in a view are rendered.

<ViewBody
  ExpandXML = "TRUE" | "FALSE">
</ViewBody>

Attributes

Attribute

Description

ExpandXML

Optional Boolean. TRUE to re-pass the rendered content through the Collaborative Application Markup Language (CAML) interpreter, which allows CAML to render CAML.

Child Elements

Numerous

Parent Elements

View, ViewStyle

Occurrences

Minimum: 0

Maximum: 1

Remarks

A fields enumeration works differently in the ViewBody element for a view than it does elsewhere in CAML. In a view body, the enumeration loops through the fields in the ViewFields collection, instead of through all the fields in the list.

Example

The following example defines the body for a document library view. Each record in the view is rendered according to the class ms-vb defined in the Core.css file (\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\LCID\STYLES).

<ViewBody>
  <HTML>
    <![CDATA[ <TR> ]]>
  </HTML>
  <Fields>
    <HTML>
      <![CDATA[ <TD Class="ms-vb"> ]]>
    </HTML>
    <Field />
    <HTML>
      <![CDATA[ </TD> ]]>
    </HTML>
  </Fields>
  <HTML>
    <![CDATA[ </TR> ]]>
  </HTML>
</ViewBody>

See Also

Reference

ViewBidiHeader Element (View)

ViewEmpty Element (View)

ViewFields Element (View)

ViewFooter Element (View)

ViewHeader Element (View)