TreeNodeCollection

Wisej.Web.TreeNodeCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents a collection of TreeNode objects.

public class TreeNodeCollection : IList, ICollection, IEnumerable, IList<TreeNode>, ICollection<TreeNode>, IEnumerable<TreeNode>

Properties

Int32: Returns the total number of TreeNode objects in the collection.

Boolean: Returns a value indicating whether the collection is read-only.

TreeNode: Returns or sets the TreeNode at the specified index in the collection.

Throws:

TreeNode: Returns the TreeNode with the specified key from the collection.

Methods

Adds a new tree node with the specified label text to the end of the current TreeNodeCollection.

ParameterTypeDescription

text

The label text displayed by the TreeNode.

Returns: TreeNode. A TreeNode that represents the tree node being added to the collection.

Creates a new TreeNode with the specified key and text, and adds it to the collection.

ParameterTypeDescription

key

The name of the TreeNode.

text

The text to display in the TreeNode.

Returns: TreeNode. The TreeNode that was added to the collection.

Creates a TreeNode with the specified key, text, and image, and adds it to the collection.

ParameterTypeDescription

key

The name of the TreeNode.

text

The text to display in the TreeNode.

imageIndex

The index of the image to display in the TreeNode.

Returns: TreeNode. The TreeNode that was added to the collection.

Creates a TreeNode with the specified key, text, and image, and adds it to the collection.

ParameterTypeDescription

key

The name of the TreeNode.

text

The text to display in the TreeNode.

imageKey

The image to display in the TreeNode.

Returns: TreeNode. The TreeNode that was added to the collection.

Creates a TreeNode with the specified key, text, and images, and adds it to the collection.

ParameterTypeDescription

key

The name of the TreeNode.

text

The text to display in the TreeNode.

imageIndex

The index of the image to display in the TreeNode.

selectedImageIndex

The index of the image to be displayed in the tree node when it is in a selected state.

Returns: TreeNode. The tree node that was added to the collection.

Creates a TreeNode with the specified key, text, and images, and adds it to the collection.

ParameterTypeDescription

key

The name of the TreeNode.

text

The text to display in the TreeNode.

imageKey

The key of the image to display in the TreeNode.

selectedImageKey

The key of the image to display when the node is in a selected state.

Returns: TreeNode. The TreeNode that was added to the collection.

Adds a previously created TreeNode to the end of the TreeNodeCollection.

ParameterTypeDescription

node

The TreeNode to add to the collection.

Returns: Int32. The zero-based index value of the TreeNode added to the TreeNodeCollection.

Throws:

Adds an array of previously created TreeNode objects to the collection.

ParameterTypeDescription

nodes

An array of TreeNode objects representing the tree nodes to add to the collection.

Throws:

Removes all tree nodes from the collection.

Removes and disposes all tree nodes from the collection.

ParameterTypeDescription

dispose

Indicates whether to dispose the tree nodes removed from the collection.

Determines whether the specified TreeNode is a member of the collection.

ParameterTypeDescription

node

The TreeNode to locate in the collection.

Returns: Boolean. true if the TreeNode is a member of the collection; otherwise, false.

Determines whether the collection contains a TreeNode with the specified key.

ParameterTypeDescription

key

The name of the TreeNode to search for.

Returns: Boolean. true to indicate the collection contains a TreeNode with the specified key; otherwise, false.

Copies the entire collection into an existing array at a specified location within the array.

ParameterTypeDescription

dest

The destination array.

index

The index in the destination array at which storing begins.

Finds the TreeNode objects with specified key, optionally searching sub nodes.

ParameterTypeDescription

key

The name of the tree node to search for.

searchAllChildren

true to search child nodes of tree nodes; otherwise, false.

Returns: TreeNode[]. An array of TreeNode objects whose Name property matches the specified key.

Returns an enumerator that can be used to iterate through the TreeNodeCollection.

Returns: IEnumerator<TreeNode>. An IEnumerator that represents the TreeNodeCollection.

Returns the index of the specified TreeNode in the collection.

ParameterTypeDescription

node

The TreeNode to locate in the collection.

Returns: Int32. The zero-based index of the item found in the tree node collection; otherwise, -1.

Returns the index of the first occurrence of a TreeNode with the specified key.

ParameterTypeDescription

key

The name of the tree node to search for.

Returns: Int32. The zero-based index of the first occurrence of a tree node with the specified key, if found; otherwise, -1.

Inserts an existing tree node into the tree node collection at the specified location.

ParameterTypeDescription

index

The indexed location within the collection to insert the TreeNode.

node

The TreeNode to insert into the collection.

Throws:

Creates a TreeNode with the specified text and inserts it at the specified index.

ParameterTypeDescription

index

The location within the collection to insert the TreeNode.

text

The text to display in the TreeNode.

Returns: TreeNode. The TreeNode that was inserted in the collection.

Creates a tree node with the specified text and key, and inserts it into the collection.

ParameterTypeDescription

index

The location within the collection to insert the TreeNode.

key

The name of the TreeNode.

text

The text to display in the TreeNode.

Returns: TreeNode. The TreeNode that was inserted in the collection.

Creates a TreeNode with the specified key, text, and image, and inserts it into the collection at the specified index.

ParameterTypeDescription

index

The location within the collection to insert the TreeNode.

key

The name of the TreeNode.

text

The text to display in the TreeNode.

imageIndex

The index of the image to display in the TreeNode.

Returns: TreeNode. The TreeNode that was inserted in the collection.

Creates a TreeNode with the specified key, text, and image, and inserts it into the collection at the specified index.

ParameterTypeDescription

index

The location within the collection to insert the TreeNode.

key

The name of the TreeNode.

text

The text to display in the TreeNode.

imageKey

The key of the image to display in the TreeNode.

Returns: TreeNode. The TreeNode that was inserted in the collection.

Creates a TreeNode with the specified key, text, and images, and inserts it into the collection at the specified index.

ParameterTypeDescription

index

The location within the collection to insert the TreeNode.

key

The name of the TreeNode.

text

The text to display in the TreeNode.

imageIndex

The index of the image to display in the TreeNode.

selectedImageIndex

The index of the image to display in the TreeNode when it is in a selected state.

Returns: TreeNode. The TreeNode that was inserted in the collection.

Creates a TreeNode with the specified key, text, and images, and inserts it into the collection at the specified index.

ParameterTypeDescription

index

The location within the collection to insert the TreeNode.

key

The name of the TreeNode.

text

The text to display in the TreeNode.

imageKey

The key of the image to display in the TreeNode.

selectedImageKey

The key of the image to display in the TreeNode when it is in a selected state.

Returns: TreeNode. The TreeNode that was inserted in the collection.

Removes the specified TreeNode from the TreeNodeCollection.

ParameterTypeDescription

node

The TreeNode to remove.

Throws:

Removes a tree node from the tree node collection at a specified index.

ParameterTypeDescription

index

The index of the TreeNode to remove.

Removes the TreeNode with the specified key from the collection.

ParameterTypeDescription

key

The name of the tree node to remove from the collection.

Events

CollectionChangeEventHandler Fired when the collection changes.

Last updated