System.Web.UI.WebControls.XmlHierarchicalDataSourceView Class

Represents a data view on an XML node or collection of XML nodes for an System.Web.UI.WebControls.XmlDataSource control.

See Also: XmlHierarchicalDataSourceView Members


public class XmlHierarchicalDataSourceView : System.Web.UI.HierarchicalDataSourceView


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

The System.Web.UI.WebControls.XmlDataSource creates each view type internally through different code paths. If the System.Web.UI.IDataSource.GetView(string) method is called on the System.Web.UI.WebControls.XmlDataSource control, an System.Web.UI.WebControls.XmlDataSourceView object is created by the System.Web.UI.WebControls.XmlDataSource control. If the XmlDataSource.GetHierarchicalView(string) method is called, an System.Web.UI.WebControls.XmlHierarchicalDataSourceView object is created. The System.Web.UI.WebControls.XmlDataSourceView class is provided for Web server controls that derive from System.Web.UI.WebControls.DataBoundControl and bind to lists and tabular data, while the System.Web.UI.WebControls.XmlHierarchicalDataSourceView is provided for Web server controls that derive from System.Web.UI.WebControls.HierarchicalDataBoundControl and bind to hierarchical data. Internally, the System.Web.UI.WebControls.DataBoundControl and System.Web.UI.WebControls.CompositeDataBoundControl classes call the erload:System.Web.UI.WebControls.XmlDataSourceView.Select method of System.Web.UI.WebControls.XmlDataSourceView object view to retrieve data from a data source, while a class derived from System.Web.UI.WebControls.HierarchicalDataBoundControl calls the XmlHierarchicalDataSourceView.Select method.

Like all System.Web.UI.HierarchicalDataSourceView helper objects, the System.Web.UI.WebControls.XmlHierarchicalDataSourceView defines the operations that the data source can perform with the underlying data. Because the System.Web.UI.WebControls.XmlHierarchicalDataSourceView class only overrides the XmlHierarchicalDataSourceView.Select method, the associated System.Web.UI.WebControls.XmlDataSource control does not support sort expressions or execute, delete, or update operations.


Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions:
Since: .NET 2.0