SiteMapHierarchicalDataSourceView 类
定义
表示 SiteMapDataSource 控件的站点地图节点或节点集合的数据视图。Represents a data view on a site map node or collection of nodes for a SiteMapDataSource control.
public ref class SiteMapHierarchicalDataSourceView : System::Web::UI::HierarchicalDataSourceView
public class SiteMapHierarchicalDataSourceView : System.Web.UI.HierarchicalDataSourceView
type SiteMapHierarchicalDataSourceView = class
inherit HierarchicalDataSourceView
Public Class SiteMapHierarchicalDataSourceView
Inherits HierarchicalDataSourceView
- 继承
注解
SiteMapDataSource控件可以向绑定到该控件的 Web 服务器控件以表格格式和分层格式呈现其基础数据。The SiteMapDataSource control can present its underlying data in both tabular and hierarchical format to Web server controls that bind to it. SiteMapHierarchicalDataSourceView由控件开发人员使用,而不是由页开发人员或页代码使用。The SiteMapHierarchicalDataSourceView is used by controls developers, but not page developers or in page code.
控件(如 Menu 或) DropDownList 使用 SiteMapDataSource 绑定到站点地图数据并在列表窗体中显示,而从类派生的控件( HierarchicalDataBoundControl 例如 TreeView )绑定到站点地图数据并以层次结构形式呈现数据。Controls such as Menu or DropDownList use the SiteMapDataSource to bind to site map data and present it in list form, while controls that derive from the HierarchicalDataBoundControl class, such as TreeView, bind to sitemap data and present it in hierarchical form.
如果数据绑定控件调用的 GetView 方法 SiteMapDataSource , SiteMapDataSourceView 则由数据源创建。If a data-bound control calls the GetView method of the SiteMapDataSource, a SiteMapDataSourceView is created by the data source. 如果控件调用 HierarchicalDataBoundControl GetHierarchicalView 方法, SiteMapHierarchicalDataSourceView 则创建。If a control calls the HierarchicalDataBoundControlGetHierarchicalView method, a SiteMapHierarchicalDataSourceView is created. 为派生自 SiteMapDataSourceView DataBoundControl 和绑定到列表和表格数据的 web 服务器控件提供类,同时为 SiteMapHierarchicalDataSourceView 派生自 HierarchicalDataBoundControl 和绑定到分层数据的 web 服务器控件提供。The SiteMapDataSourceView class is provided for Web server controls that derive from DataBoundControl and bind to lists and tabular data, while the SiteMapHierarchicalDataSourceView is provided for Web server controls that derive from HierarchicalDataBoundControl and bind to hierarchical data.
与所有 HierarchicalDataSourceView 帮助器对象一样, SiteMapHierarchicalDataSourceView 定义数据源可对基础数据执行的操作。Like all HierarchicalDataSourceView helper objects, the SiteMapHierarchicalDataSourceView defines the operations that the data source can perform with the underlying data. 因为 SiteMapHierarchicalDataSourceView 类只重写 Select 方法,所以关联的 SiteMapDataSource 控件不支持排序表达式、插入、删除或更新操作。Because the SiteMapHierarchicalDataSourceView class only overrides the Select method, the associated SiteMapDataSource control does not support sort expressions or insert, delete, or update operations.
构造函数
| SiteMapHierarchicalDataSourceView(SiteMapNode) |
初始化 SiteMapHierarchicalDataSourceView 类的新实例,将指定的节点添加到数据源视图所维护的 IHierarchicalEnumerable 集合中。Initializes a new instance of the SiteMapHierarchicalDataSourceView class, adding the specified node to the IHierarchicalEnumerable collection that the data source view maintains. |
| SiteMapHierarchicalDataSourceView(SiteMapNodeCollection) |
初始化 SiteMapHierarchicalDataSourceView 类的新实例,将指定的集合设置为数据源视图所维护的 IHierarchicalEnumerable 集合。Initializes a new instance of the SiteMapHierarchicalDataSourceView class, setting the specified collection to the IHierarchicalEnumerable collection that the data source view maintains. |
方法
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| Select() |
获取 SiteMapNode 对象的集合,这些对象表示当前用户的站点导航结构。Gets the collection of the SiteMapNode objects that represents the site navigation structure for the current user. |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |