System.Web.UI.WebControls Namespace TreeNode Class
.NET Framework version 2.0
Sets or retrieves a value indicating whether a check box in a TreeNode control is checked.
Inline |
<asp:treenode checked [ = true | false ] ... > |
Script |
TreeNode.Checked [ = true | false ] |
This property accepts or returns only a boolean value: true to indicate a checked state; otherwise false. Default value is false.
Use the Checked property to declaratively set the initial state of a TreeNode control or to programmatically specify or determine whether the check box in a TreeNode control is checked.
NOTE: This property applies only when a node displays a check box.
When the check box associated with a node is selected, the node is automatically added to the CheckedNodes collection of the TreeView control.
NOTE: It is more common to determine which nodes in the TreeView control have their check boxes selected by iterating through the CheckedNodes collection.
In certain cases, such as when a TreeView control is bound to a data source, the Checked property is usually obtained dynamically from the data source.
TreeNode Members