Export (0) Print
Expand All

XmlDataSourceView Class

Represents a tabular data source view on XML data for an XmlDataSource control.

System.Object
  System.Web.UI.DataSourceView
    System.Web.UI.WebControls.XmlDataSourceView

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public sealed class XmlDataSourceView : DataSourceView

The XmlDataSourceView type exposes the following members.

  NameDescription
Public methodXmlDataSourceViewInitializes a new named instance of the XmlDataSourceView class, and associates the specified XmlDataSource with it.
Top

  NameDescription
Public propertyCanDeleteGets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports the ExecuteDelete operation. (Inherited from DataSourceView.)
Public propertyCanInsertGets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports the ExecuteInsert operation. (Inherited from DataSourceView.)
Public propertyCanPageGets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports paging through the data retrieved by the ExecuteSelect method. (Inherited from DataSourceView.)
Public propertyCanRetrieveTotalRowCountGets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports retrieving the total number of data rows, instead of the data. (Inherited from DataSourceView.)
Public propertyCanSortGets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports a sorted view on the underlying data source. (Inherited from DataSourceView.)
Public propertyCanUpdateGets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports the ExecuteUpdate operation. (Inherited from DataSourceView.)
Public propertyNameGets the name of the data source view. (Inherited from DataSourceView.)
Top

  NameDescription
Public methodCanExecuteDetermines whether the specified command can be executed. (Inherited from DataSourceView.)
Public methodDeletePerforms an asynchronous delete operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback)Executes the specified command. (Inherited from DataSourceView.)
Protected methodExecuteSelectGets a list of data from the underlying data storage. (Inherited from DataSourceView.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInsertPerforms an asynchronous insert operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Protected methodRaiseUnsupportedCapabilityErrorCalled by the RaiseUnsupportedCapabilitiesError method to compare the capabilities requested for an ExecuteSelect operation against those that the view supports. (Inherited from DataSourceView.)
Public methodSelect(DataSourceSelectArguments)Retrieves a list of data rows from the underlying XML.
Public methodSelect(DataSourceSelectArguments, DataSourceViewSelectCallback)Gets a list of data asynchronously from the underlying data storage. (Inherited from DataSourceView.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodUpdatePerforms an asynchronous update operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Top

  NameDescription
Public eventDataSourceViewChangedOccurs when the data source view has changed. (Inherited from DataSourceView.)
Top

The XmlDataSource control can present its underlying data in both tabular and hierarchical format to Web server controls that bind to it. Controls such as GridView or DropDownList use the XmlDataSource to bind to XML data and present it in list or tabular form, while controls that derive from the HierarchicalDataBoundControl class, such as TreeView, bind to XML data and present it in hierarchical form.

The XmlDataSource creates each view type internally through different code paths. If the GetView method is called on the XmlDataSource, an XmlDataSourceView is created by the XmlDataSource. If the GetHierarchicalView method is called, an XmlHierarchicalDataSourceView is created. The XmlDataSourceView class is provided for Web server controls that derive from DataBoundControl and bind to lists and tabular data, while the XmlHierarchicalDataSourceView is provided for Web server controls that derive from HierarchicalDataBoundControl and bind to hierarchical data. Internally, all data-bound control methods call the Select method on whichever data source view object is returned.

Like all DataSourceView helper objects, the XmlDataSourceView defines the operations that the data source can perform with the underlying data. Because the XmlDataSourceView class only overrides the Select method, the associated XmlDataSource control does not support update, insert, or delete operations. Because the XmlDataSourceView class is sealed, you cannot extend the XmlDataSourceView class to add this functionality, but you can derive a data source control from XmlDataSource and a view from DataSourceView if you require additional functionality.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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