TreeNode

Wisej.Web.TreeNode

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents a node of a TreeView.

public class TreeNode : Component, ICloneable, IHasPropertyStore, IImage

Constructors

Initializes a new instance of the TreeNode class.

Initializes a new instance of the TreeNode class with the specified label text.

NameTypeDescription

text

The label Text of the new tree node.

Initializes a new instance of the TreeNode class with the specified label text and child tree nodes.

NameTypeDescription

text

The label Text of the new tree node.

children

An array of child TreeNode objects.

Initializes a new instance of the TreeNode class with the specified label text and images to display when the tree node is in a selected and unselected state.

NameTypeDescription

text

The label Text of the new tree node.

imageIndex

The index value of Image to display when the tree node is unselected.

selectedImageIndex

The index value of Image to display when the tree node is selected.

Initializes a new instance of the TreeNode class with the specified label text, child tree nodes, and images to display when the tree node is in a selected and unselected state.

NameTypeDescription

text

The label Text of the new tree node.

imageIndex

The index value of Image to display when the tree node is unselected.

selectedImageIndex

The index value of Image to display when the tree node is selected.

children

An array of child TreeNode objects.

Properties

Boolean: Returns or sets a value indicating that the tree node can display HTML in the Text property. (Default: False)

Color: Returns or sets the background color of the tree node.

Nullable<Boolean>: Returns or sets whether a checkbox is displayed next to the tree node. (Default: null)

Boolean: Returns or sets whether the tree node is in a checked state. (Default: False)

CheckState: Returns or sets the checked state of the tree node. (Default: Unchecked)

ContextMenu: Returns the shortcut menu that is associated with this tree node. (Default: null)

Boolean: Returns or sets whether the tree node is in enabled. (Default: True)

TreeNode: Returns the first child tree node in the tree node collection.

Color: Returns or sets the foreground color of the tree node.

String: Returns the path from the root tree node to the current tree node.

Nullable<Boolean>: Returns or sets a valid indicating whether the node image next to the tree node is hidden. (Default: null)

Int32: Returns or sets the image list index value of the image displayed when the tree node is in the unselected state. (Default: -1)

Throws:

String: Returns or sets the key for the image associated with this tree node when the node is in an unselected state. (Default: "")

ImageList: Returns the ImageList that contains the images displayed in the TreeNode.

Int32: Returns the position of the tree node in the tree node collection.

Boolean: Returns a value indicating whether the tree node is in an editable state.

Boolean: Returns or sets whether the tree node is enabled.

Boolean: Returns a value indicating whether the tree node is in the expanded state.

Boolean: Returns or sets whether the tree node is a parent node and can be expanded.

Setting this property to true when the node doesn't have any children, will cause the node to expand anyway and request the child nodes from the server.

Boolean: Returns a value indicating whether the tree node is in the selected state.

TreeNode: Returns the last child tree node.

Boolean: Returns or sets whether child nodes are sent to the client the first time this node is expanded. (Default: False)

This option sends less data to the client and speeds up the creation of tree nodes with many child nodes. It can be used in conjunction with the property ShowLoader.

Int32: Returns the zero-based depth of the tree node in the TreeView control.

String: Returns or sets the name of the tree node.

TreeNode: Returns the next sibling tree node.

TreeNode: Returns the next visible tree node.

Int32: Returns the number of child nodes without forcing the creation of the collection. Since 3.1

Font: Returns or sets the font that is used to display the text on the tree node label.

TreeNodeCollection: Returns the collection of tree nodes assigned to the current tree node.

Int32: Returns or sets the index of the image that is used when the tree node is expanded. (Default: -1)

Throws:

String: Returns or sets the key of the image that is used when the tree node is expanded. (Default: "")

TreeNode: Returns the parent tree node of the current tree node.

TreeNode: Returns the previous sibling tree node.

TreeNode: Returns the previous visible tree node.

Int32: Returns or sets the image list index value of the image that is displayed when the tree node is in the selected state. (Default: -1)

Throws:

String: Returns or sets the key of the image displayed in the tree node when it is in a selected state. (Default: "")

Boolean: Returns or sets whether the tree node shows the node-loader image when it is expanding but it doesn't have any child nodes. (Default: False)

Int32: Returns or sets the index of the image that is used to indicate the state of the tree node when the parent TreeView has its CheckBoxes property set to false. (Default: -1)

Throws:

String: Returns or sets the key of the image that is used to indicate the state of the tree node when the parent TreeView has its CheckBoxes property set to false. (Default: "")

Object: Returns or sets the object that contains data about the tree node. (Default: null)

String: Returns or sets the text displayed in the label of the tree node. (Default: "")

When AllowHtml is set to true, the text can contain HTML content. If the text contains new lines (CRLF) but doesn't contain HTML elements (at least one "<") all CRLF are automatically substituted with "<br/>".

String: Returns or sets the text that appears when the mouse pointer hovers over a tree node. (Default: "")

TreeView: Returns the parent TreeView.

Boolean: Returns or sets whether the tree node is visible. (Default: True)

Methods

Initiates the editing of the tree node label.

Throws:

Copies the tree node and the entire subtree rooted at this tree node.

Returns: Object. The Object that represents the cloned TreeNode.

Collapses the tree node.

Collapses the tree node and optionally collapses its children.

ParameterTypeDescription

ignoreChildren

true to leave the child nodes in their current state; false to collapse the child nodes.

Collapses the tree node and all its children.

Cancels the editing of the tree node label.

ParameterTypeDescription

cancel

True to discard the edited value.

Ensures that the tree node is visible, expanding tree nodes and scrolling the tree view control as necessary.

Expands the tree node.

Expands all the child tree nodes.

Returns the TreeNode with the specified handle and assigned to the specified TreeView control.

ParameterTypeDescription

tree

The TreeView that contains the TreeNode.

handle

The handle of the TreeNode.

Returns: TreeNode. The TreeNode assigned to the TreeView with the specified handle.

Returns the number of child tree nodes.

ParameterTypeDescription

includeSubTrees

true if the resulting count includes all tree nodes indirectly rooted at this tree node; otherwise, false.

Returns: Int32. The number of child tree nodes assigned to the Nodes collection.

Removes the current tree node from the tree view control.

Toggles the tree node to either the expanded or collapsed state.

Updates the component on the client. Overridden to repaint the tree view in design mode.

Events

TreeViewEventHandler Occurs after the tree node check box is checked.

TreeViewEventHandler Occurs after the tree node is collapsed.

TreeViewEventHandler Occurs after the tree node is expanded.

NodeLabelEditEventHandler Occurs after the tree node label text is edited.

TreeViewEventHandler Occurs after the tree node is selected.

TreeViewCancelEventHandler Occurs before the tree node check box is checked.

TreeViewCancelEventHandler Occurs before the tree node is collapsed.

TreeViewCancelEventHandler Occurs before the tree node is expanded.

NodeLabelEditEventHandler Occurs before the tree node label text is edited.

TreeViewCancelEventHandler Occurs before the tree node is selected.

TreeViewNodeDragEventHandler Fired when the user begins dragging a TreeNode.

TreeNodeMouseClickEventHandler Fired when the user clicks a TreeNode with the mouse.

TreeNodeMouseClickEventHandler Fired when the user double-clicks a TreeNode with the mouse.

TreeNodeMouseHoverEventHandler Fired when the mouse hovers over a TreeNode.

TreeNodeMouseHoverEventHandler Fired when the mouse leaves the TreeNode.

Implements

NameDescription

Provides access to common image properties across the controls that implement this interface.

All wisej components implement this interface.

Allows an object to serialize itself.

Last updated