TREENODE Element | TreeNode Class

This class represents a TreeNode within a TreeView.

Syntax

Visual Basic  Public  Class TreeNode Inherits TreeBase Implements IParserAccessor
C# public   class TreeNode : TreeBase, IParserAccessor
Managed C++ public:  __gc class TreeNode :  public TreeBase, IParserAccessor
JScript public   class TreeNode extends TreeBase, IParserAccessor

Inheritance Hierarchy

Object::BaseChildNode::TreeBase

Members Table

The following table lists the members exposed by the TreeNode object.

Attribute Property Description
CHECKED Checked Sets or retrieves a value that indicates whether or not the node is checked.
EXPANDABLE Expandable Sets or retrieves a value that indicates whether a plus-sign image displays on a node.
EXPANDED Expanded Sets or retrieves a value that indicates whether or not the node is expanded.
LEVEL Level Retrieves an int that indicates the level in the tree.
NAVIGATEURL NavigateUrl Sets or retrieves the URL of the page to navigate to when the user clicks a node.
NodeData Sets or retrieves a custom data string.
Nodes Retrieves the TreeNodeCollection of nodes in the control.
ParentTreeView Sets or retrieves a reference to the parent TreeView.
TREENODESRC TreeNodeSrc Sets or retrieves a value that indicates the URL of an XML file, string, or XML data island containing TreeNode elements.
TREENODEXSLTSRC TreeNodeXsltSrc Sets or retrieves the URL to an Extensible Stylesheet Language Transformations (XSLT) file to transform TreeNode elements.
TYPE Type Sets or retrieves the name of the node type.
Method Description
CalcJunction Determines if the current node is an L, T, or Root junction.
Clone Creates a new object that is a copy of the current instance.
DataBind Binds the data to the TreeNode or the TreeView whether the TreeNode has been expanded or not.
FindNodeAttribute Retrieves the attribute from the first place it is defined. The attribute may be defined in the TreeNode, in the TreeNodeType, or in the TreeView.
GetNodeIndex Retrieves an x.y.z format node index string representing the node's position in the hierarchy.
GetNodeTypeAttribute Retrieves a value that indicates the value of the attribute of the node's TreeNodeType.
GetPreviousSibling Retrieves the node's previous TreeNode sibling.
GetSiblingNodeCollection Retrieves the TreeNodeCollection containing the current TreeNode.
AddParsedSubObject Adds a TreeNode to the TreeNodeCollection
LoadViewState Loads the item's previously saved view state.
OnCheck Fires the Check event on the TreeNode object.
OnCollapse Fires the Collapse event on the TreeNode object.
OnExpand Fires the Expand event on the TreeNode object.
OnSelectedIndexChange Fires the SelectedIndexChange event on the TreeNode object.
Remove Removes the TreeNode and any children from its parent's nodes collection.
RenderDesignerPath Implements the rendering path for the Microsoft Visual Studio .NET Editor.
RenderDownLevelPath Implements the downLevel rendering path in this method.
RenderUpLevelPath Implements the uplevel rendering path for this method.
SaveViewState Saves changes to the item's view state to an object.
SetViewStateDirty Sets all items within the StateBag to be dirty.
TrackViewState Instructs the control to track changes to its view state.

Class Information

Namespace Microsoft.Web.UI.WebControls
Assembly Microsoft.Web.UI.WebControls.dll

Applies To

TREEVIEW

See Also

Internet Explorer WebControls, About the TreeView WebControl