TreeView::Nodes Property
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
[PersistenceModeAttribute(PersistenceMode::InnerProperty)] public: property TreeNodeCollection^ Nodes { TreeNodeCollection^ get (); }
Property Value
Type: System.Web.UI.WebControls::TreeNodeCollectionA TreeNodeCollection that contains the root nodes in the TreeView.
Use the Nodes property to get a TreeNodeCollection object that contains all the root nodes in the tree. This collection is commonly used to quickly iterate through all the root nodes, or to access a specific root node in the tree.
Note |
|---|
A typical tree structure has only one root node; however, you can add multiple root nodes to the TreeView control. |
The Nodes property can also be used to manage the root nodes in the tree programmatically. You can add, insert, remove, and retrieve TreeNode objects from the collection. Any updates to the collection are automatically reflected in the TreeView control after the next round trip to the server.
To access the child nodes of a root node, use the ChildNodes property of the node. Use the ChildNodes property of each subsequent parent-level node to navigate down the node levels.
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.
Note