TreeView::Nodes Property
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, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: