| |||||
TreeView.Nodes PropertySystem.Web.UI.WebControls Namespace TreeView Class .NET Framework version 2.0 Returns a collection of TreeNode objects that represents the root nodes in a TreeView control. Syntax
Property Value
The property is read/write with no default value. RemarksUse the Nodes collection to programmatically obtain information about each root node in a TreeView control. This collection is typically used to iterate through all the root nodes, or to access a specific root node in the tree.
The Nodes property can also be used to programmatically add, insert, or remove TreeNode objects in 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 or parent node, use the ChildNodes property of the node ( or the subsequent parent-level node ) to navigate down the node hierarchy. ExampleThe following example shows how to programmatically add TreeNode objects to the Nodes collection of a TreeView control. TreeNode newNode = new TreeNode ( nodeText, nodeValue ); newNode.NavigateUrl = webPageUrl; menuObject.Nodes.Add ( newNode ); |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme