XmlHierarchicalDataSourceView 類別

定義

表示 XmlDataSource 控制項之 XML 節點或 XML 節點集合的資料檢視。Represents a data view on an XML node or collection of XML nodes for an XmlDataSource control.

public ref class XmlHierarchicalDataSourceView : System::Web::UI::HierarchicalDataSourceView
public class XmlHierarchicalDataSourceView : System.Web.UI.HierarchicalDataSourceView
type XmlHierarchicalDataSourceView = class
    inherit HierarchicalDataSourceView
Public Class XmlHierarchicalDataSourceView
Inherits HierarchicalDataSourceView
繼承
XmlHierarchicalDataSourceView

備註

XmlDataSource控制項可以將其基礎資料以表格式和階層格式呈現給系結至它的 Web 服務器控制項。The XmlDataSource control can present its underlying data in both tabular and hierarchical format to Web server controls that bind to it. 控制項(例如 GridViewDropDownList XmlDataSource )會使用來系結至 xml 資料,並以清單或表格式形式呈現,而衍生自類別的控制項(例如)會系結 HierarchicalDataBoundControl TreeView 至 xml 資料,並以階層形式呈現該資料。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.

XmlDataSource 透過不同的程式碼路徑在內部建立每個檢視類型。The XmlDataSource creates each view type internally through different code paths. 如果在 GetView 控制項上呼叫方法 XmlDataSourceXmlDataSourceView 控制項就會建立物件 XmlDataSourceIf the GetView method is called on the XmlDataSource control, an XmlDataSourceView object is created by the XmlDataSource control. 如果 GetHierarchicalView 呼叫方法, XmlHierarchicalDataSourceView 則會建立物件。If the GetHierarchicalView method is called, an XmlHierarchicalDataSourceView object is created. XmlDataSourceView類別是針對衍生自和系結至清單和表格式資料的 web 伺服器控制項所提供 DataBoundControl ,而則 XmlHierarchicalDataSourceView 是針對衍生自和系結 HierarchicalDataBoundControl 至階層式資料的 web 伺服器控制項提供。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. 在內部, DataBoundControlCompositeDataBoundControl 類別會呼叫 Select XmlDataSourceView 物件檢視的方法,從資料來源中取出資料,而衍生自的類別會 HierarchicalDataBoundControl 呼叫 Select 方法。Internally, the DataBoundControl and CompositeDataBoundControl classes call the Select method of XmlDataSourceView object view to retrieve data from a data source, while a class derived from HierarchicalDataBoundControl calls the Select method.

就像所有 HierarchicalDataSourceView helper 物件一樣, XmlHierarchicalDataSourceView 會定義資料來源可以使用基礎資料執行的作業。Like all HierarchicalDataSourceView helper objects, the XmlHierarchicalDataSourceView defines the operations that the data source can perform with the underlying data. 由於 XmlHierarchicalDataSourceView 類別只會覆寫 Select 方法,因此相關聯的 XmlDataSource 控制項不支援排序運算式或執行、刪除或更新作業。Because the XmlHierarchicalDataSourceView class only overrides the Select method, the associated XmlDataSource control does not support sort expressions or execute, delete, or update operations.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
Select()

從基礎資料來源取得資料項目清單。Gets a list of the data items from the underlying data source.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於

另請參閱