TreeNodeTypes Enumeration

Represents the different node types (leaf, parent, and root) in the TreeView control.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

[FlagsAttribute] 
public enum class TreeNodeTypes
/** @attribute FlagsAttribute() */ 
public enum TreeNodeTypes
FlagsAttribute 
public enum TreeNodeTypes

 Member nameDescription
AllAll nodes. 
LeafA node with no child nodes. 
NoneNo nodes. 
ParentA node with a parent node and one or more child nodes. 
RootA node with no parent node and one or more child nodes. 

The TreeNodeTypes enumeration is used to represent the different node types that are available in the TreeView control. The following table describes the three different node types.

Node type

Description

Leaf

A node with no child nodes.

Parent

A node with a parent node and one or more child nodes.

Root

A node with no parent node and one or more child nodes.

The TreeNodeTypes enumeration is a flag enumeration, which allows you to combine values through bitwise operations. For example, to represent the parent and leaf nodes, you can perform a bitwise OR operation on the Parent and Leaf values.

NoteNote:

The ShowCheckBoxes property uses the TreeNodeTypes enumeration to represent the node types that display check boxes in the TreeView control. When it is set to a value other than the None value, check boxes are displayed next to the specified node type, which allows users to select multiple items from the TreeView control.

The following code example demonstrates how to use the TreeNodeTypes enumeration to indicate that the TreeView control should show a check box for each of the parent and leaf nodes only.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: