Compartilhar via


ViewFields Property

The ViewFields property of the SPView class gets the view fields used in the view.

Property Value

A Microsoft.SharePoint.SPViewFieldCollection object that represents the view fields.

Remarks

See the ViewFields element for more information on view fields.

Example

The following code example uses the ViewFields property to return the collection of view fields in the All Items view of a list and adds a new view field to the collection.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security