Click to Rate and Give Feedback
Community Content
In this section
Statistics Annotations (8)
Collapse All/Expand All Collapse All
This page is specific to
The 2007 product release

Other versions are also available for the following:
SPView Class (Microsoft.SharePoint)
Represents a view of the data that is contained in a list on a SharePoint site.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class SPView
Visual Basic (Usage)
Dim instance As SPView
C#
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public class SPView

Use the DefaultView property of the SPList class to return the default view for a list, or the GetView method to return a specified view. Use the GetViewFromUrl method of the SPWeb class to return a view for a list within a site, and use the View property of the SPViewFieldCollection class to get the parent view of the collection of view fields. Otherwise, use the Views property of either the SPList class or the SPView class to return the collection of views for a list or the parent collection of views for a view.

Use an indexer to return a single view from a collection of views. For example, if the collection is assigned to a variable named collViews, use collViews[index] in C#, or collViews(index) in Visual Basic, where index is the index number of the view in the collection, the name of the view, or the GUID for the view.

System.Object
  Microsoft.SharePoint.SPView
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker