TreeNodeCollection Class

This class represents a collection of TreeNode objects within a TreeView.

Syntax

Visual Basic  Public  Class TreeNodeCollection Inherits BaseChildNodeCollection
C# public   class TreeNodeCollection : BaseChildNodeCollection
Managed C++ public:  __gc class TreeNodeCollection :  public BaseChildNodeCollection
JScript public   class TreeNodeCollection extends BaseChildNodeCollection

Inheritance Hierarchy

Object::Collections::CollectionBase::BaseChildNodeCollection

Members Table

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

Property Description
Item Retrieves the item in the collection that matches the int being searched for.
Parent Sets or retrieves the parent object of a TreeNodeCollection.
Method Description
Add Adds a TreeNode to the TreeNodeCollection.
AddAt Adds a TreeNode to the TreeNodeCollection at a specified index.
Contains Determines whether a TreeNode is in the TreeNodeCollection.
IndexOf Determines the index of a TreeNode within the TreeNodeCollection.
OnInsert Sets the object properties when adding a new object to the collection.
OnInsertComplete Adjusts the selected object after inserting an item.
OnRemove Called when a node is removed from the collection.
OnRemoveComplete Sets the parent of the object that was removed to null.
OnSet Called when a node's properties are being set.
Remove Removes a TreeNode from the TreeNodeCollection.

Class Information

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

See Also

Internet Explorer WebControls, About the TreeView WebControl