SPDataSourceView class

Supports the SPDataSource control and provides an interface for data-bound controls to perform operations against SharePoint Foundation data.

Inheritance hierarchy

System.Object
  System.Web.UI.DataSourceView
    Microsoft.SharePoint.WebControls.SPDataSourceView

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class SPDataSourceView _
    Inherits DataSourceView
'Usage
Dim instance As SPDataSourceView
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class SPDataSourceView : DataSourceView

Remarks

The SPDataSourceView class implements the data functionality that is exposed by the SPDataSource control. At run time, one SPDataSourceView object is created for each instance of the SPDataSource class.

Page developers should access the SPDataSourceView object only indirectly, through the associated SPDataSource object. For example, when page code sets the SelectCommand property of an SPDataSource object, the SPDataSource object passes the value on to the SelectCommand property of the associated SPDataSourceView object. Conversely, when a data-bound control calls the Select method of an SPDataSourceView object, the SPDataSourceView object calls the OnSelecting method of its associated SPDataSource object, which then raises the Selecting event. Page developers can handle the event by overriding the OnSelecting method.

Data-bound control developers must have direct access to the SPDataSourceView object. For example, code in a data-bound control might call the DataBoundControl.GetData() method to retrieve a SPDataSourceView object from the associated data source control, and then call the Select method of the SPDataSourceView object to retrieve the data.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also

Reference

SPDataSourceView members

Microsoft.SharePoint.WebControls namespace