System.Web.UI.WebControls Namespace TreeView Class
.NET Framework version 2.0
Returns a collection of TreeNode objects in a TreeView control that display a selected check box.
Script |
[ TreeNodeCollection variable = ] TreeView.CheckedNodes |
variable |
Returns a TreeNodeCollection that contains the nodes in a TreeView that display a selected check box. |
The property is read/write with no default value.
Use the CheckedNodes collection to programmatically obtain information about each node that displays a selected check box in a TreeView control. This collection is typically used to iterate through all the nodes that have a selected check box in the tree.
The TreeNodeCheckChanged event is raised when the check boxes of the TreeView control change state between posts to the server. This allows you to provide an event-handling method that performs a custom routine, such as updating a database or the displayed content, whenever this event occurs.
NOTE: The CheckedNodes collection is populated using a depth-first traversal of the tree structure: each parent node is processed down to its child nodes before the next parent node is populated.
TreeView Members TreeNode