This documentation is archived and is not being maintained.

IHierarchyData Interface

Exposes a node of a hierarchical data structure, including the node object and some properties that describe characteristics of the node. Objects that implement the IHierarchyData interface can be contained in IHierarchicalEnumerable collections, and are used by ASP.NET site navigation and data source controls.

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

public interface class IHierarchyData

The IHierarchyData type exposes the following members.

  NameDescription
Public propertyHasChildrenIndicates whether the hierarchical data node that the IHierarchyData object represents has any child nodes.
Public propertyItemGets the hierarchical data node that the IHierarchyData object represents.
Public propertyPathGets the hierarchical path of the node.
Public propertyTypeGets the name of the type of Object contained in the Item property.
Top

  NameDescription
Public methodGetChildrenGets an enumeration object that represents all the child nodes of the current hierarchical node.
Public methodGetParentGets an IHierarchyData object that represents the parent node of the current hierarchical node.
Top

The IHierarchyData interface is implemented by classes that represent nodes of a hierarchical structure, and track the hierarchical relationships to their parent and child nodes. Classes that implement the IHierarchyData interface can be contained in collections that implement the IHierarchicalEnumerable interface.

The following code example demonstrates how to implement the IHierarchyData interface with a class that wraps a FileSystemInfo object. The FileSystemInfo class is a good example of a hierarchical data node, which the IHierarchyData interface represents for ASP.NET hierarchical data source controls. This code example is part of a larger example provided for the HierarchicalDataSourceControl class.

No code example is currently available or this language may not be supported.

The following code example demonstrates how to recursively iterate through an IHierarchicalEnumerable collection, extract the IHierarchyData item from the enumerator using the GetHierarchyData method, and perform basic work with the data item.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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