# TreeView

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Control](https://docs.wisej.com/api/wisej.web/general/control)
  * [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview)

Displays a hierarchical collection of labeled items, each represented by a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode).

{% tabs %}
{% tab title="C#" %}

```csharp
public class TreeView : Control
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class TreeView
    Inherits Control
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TreeView()

Initializes a new instance of the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview) class.

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BorderStyle

[BorderStyle](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.borderstyle): Gets or sets the border style of the tree view control. (Default: `Solid`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) CheckBoxes

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether check boxes are displayed next to the tree nodes in the tree view control. Tree nodes may override this property setting the [CheckBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.treenode#checkbox) property. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) HideNodeImages

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether all the node images are hidden. Tree nodes may override this property setting the [HideNodeImage](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.treenode#hidenodeimage) property. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ImageIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the image-list index value of the default image that is displayed by the tree nodes. (Default: `-1`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The specified index is less than -1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ImageKey

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the key of the default image for each node in the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview) control when it is in an unselected state. (Default: `""`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ImageList

[ImageList](https://docs.wisej.com/api/wisej.web/content/imagelist): Returns or sets the [ImageList](https://docs.wisej.com/api/wisej.web/content/imagelist) that contains the [Image](https://docs.microsoft.com/dotnet/api/system.drawing.image) objects that are used by the tree nodes. (Default: `null`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Indent

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the distance in pixels to indent each child tree node level. (Default: `-1`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The assigned value is less than -1; or the assigned value is greater than 500.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ItemHeight

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Gets or sets the height of each tree node in the tree view control. When the value is -1, uses the value set in the theme. (Default: `-1`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The assigned value is less than -1; or the assigned value is greater than 500.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) LabelEdit

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the label text of the tree nodes can be edited. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Nodes

[TreeNodeCollection](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodecollection): Returns the collection of tree nodes that are assigned to the tree view control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) OpenedImageIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the image list index value of the image that is displayed when a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) is expanded. (Default: `-1`)

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The index assigned value is less than -1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) OpenedImageKey

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the key of the default image shown when a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) is expanded. (Default: `""`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) PathSeparator

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the delimiter string that the tree node path uses. (Default: `"\"`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) PrefetchItems

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the number of items to prefetch outside of the visible area when [VirtualScroll](#virtualscroll) is set to true. The default is 0 (disabled). (Default: `0`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RightClickSelection

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) under the pointer gets selected on a right click. (Default: `False`)

When the right click lands outside of a selected area the selection is not changed regardless of the value of [RightClickSelection](#rightclickselection).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Scrollable

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the tree view control displays scroll bars when they are needed. (Default: `True`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectedImageIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the image list index value of the image that is displayed when a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) is selected. (Default: `-1`)

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The index assigned value is less than -1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectedImageKey

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the key of the default image shown when a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) is selected. (Default: `""`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectedNode

[TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode): Returns or sets the tree node that is currently selected in the tree view control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectedNodes

[TreeNode\[\]](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode): Returns or sets the tree nodes that are currently selected in the tree view control. Use this property when the SelectionMode is MultiSimple or MultiExtended.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectionMode

[SelectionMode](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.selectionmode): Returns or sets the method in which items are selected in the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview). (Default: `One`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ShowNodeToolTips

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value indicating ToolTips are shown when the mouse pointer hovers over a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode). (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ShowPlusMinus

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether plus-sign (+) and minus-sign (-) buttons are displayed next to tree nodes that contain child tree nodes. (Default: `True`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ShowRootLines

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the expand/collapse icon is displayed for the root nodes (the firs level nodes). (Default: `True`)

The name of this property is kept as-is for compatibility reasons. When set to true (default) it doesn't show any line next to the root nodes or any other node. It shows or hide the expand/collapse icon next to the root nodes.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Sorted

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the tree nodes in the tree view are sorted. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) StateImageList

[ImageList](https://docs.wisej.com/api/wisej.web/content/imagelist): Returns or sets the image list that is used to indicate the state of the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview) and its nodes. (Default: `null`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Tools

[ComponentToolCollection](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttoolcollection): Returns the instance of [ComponentToolCollection](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttoolcollection) associated with this control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TopNode

[TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode): Returns or sets the first fully-visible tree node in the tree view control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TreeViewNodeSorter

[IComparer\<TreeNode>](https://docs.microsoft.com/dotnet/api/system.collections.generic.icomparer-1): Returns or sets the implementation of [IComparer](https://docs.microsoft.com/dotnet/api/system.collections.icomparer) to perform a custom sort of the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview) nodes.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) VirtualScroll

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables virtual scrolling for the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview). When virtual scrolling is enabled, only the visible nodes are rendered in the browser allowing the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview) to host virtually unlimited nodes without any performance loss. (Default: `False`)

When [VirtualScroll](#virtualscroll) is set to true, all the nodes must be of the same height, limiting the more flexible HTML rendering in the nodes available when [VirtualScroll](#virtualscroll) is off (default).\
Setting the property [PrefetchItems](#prefetchitems) to a value greater than 0 allows the virtual view to prefetch the specified number of items outside of the visible area to enable smoother scrolling.

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BeginUpdate()

This method has no effect on this control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ClearSelected()

Unselects all nodes in the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) CollapseAll()

Collapses all the tree nodes.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) Dispose(disposing)

Disposes the control.

| Parameter     | Type                                                            | Description                                                                 |
| ------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true when this method is called by the application rather than a finalizer. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) EndUpdate()

This method has no effect on this control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ExpandAll()

Expands all the tree nodes.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetNodeCount(includeSubTrees)

Retrieves the number of tree nodes, optionally including those in all subtrees, assigned to the tree view control.

| Parameter           | Type                                                            | Description                                                                                                                                                       |
| ------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **includeSubTrees** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to count the [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) items that the subtrees contain; otherwise, false. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The number of tree nodes, optionally including those in all subtrees, assigned to the tree view control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetSelected(node)

Returns a value indicating whether the specified [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) is selected.

| Parameter | Type                                                                                         | Description                                                                                                |
| --------- | -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **node**  | [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) | The [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) to check. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true if the specified [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) is currently selected in the [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview); otherwise, false.

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  The specified *node* is null.
* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The specified *node* is currently assigned to another [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnAddReferences(items)

Returns a collection of referenced components or collection of components.

| Parameter | Type                                                                    | Description |
| --------- | ----------------------------------------------------------------------- | ----------- |
| **items** | [IList](https://docs.microsoft.com/dotnet/api/system.collections.ilist) |             |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnAfterCheck(e)

Fires the [AfterCheck](#aftercheck) event.

| Parameter | Type                                                                                                           | Description                                                                                                                                    |
| --------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventargs) | A [TreeViewEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnAfterCollapse(e)

Fires the [AfterCollapse](#aftercollapse) event.

| Parameter | Type                                                                                                           | Description                                                                                                                                    |
| --------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventargs) | A [TreeViewEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnAfterExpand(e)

Fires the [AfterExpand](#afterexpand) event.

| Parameter | Type                                                                                                           | Description                                                                                                                                    |
| --------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventargs) | A [TreeViewEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnAfterLabelEdit(e)

Fires the [AfterLabelEdit](#afterlabeledit) event.

| Parameter | Type                                                                                                                     | Description                                                                                                                                              |
| --------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [NodeLabelEditEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.nodelabelediteventargs) | A [NodeLabelEditEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.nodelabelediteventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnAfterSelect(e)

Fires the [AfterSelect](#afterselect) event.

| Parameter | Type                                                                                                           | Description                                                                                                                                    |
| --------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventargs) | A [TreeViewEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnBeforeCheck(e)

Fires the [BeforeCheck](#beforecheck) event.

| Parameter | Type                                                                                                                       | Description                                                                                                                                                |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewCancelEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) | A [TreeViewCancelEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnBeforeCollapse(e)

Fires the [BeforeCollapse](#beforecollapse) event.

| Parameter | Type                                                                                                                       | Description                                                                                                                                                |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewCancelEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) | A [TreeViewCancelEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnBeforeExpand(e)

Fires the [BeforeExpand](#beforeexpand) event.

| Parameter | Type                                                                                                                       | Description                                                                                                                                                |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewCancelEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) | A [TreeViewCancelEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnBeforeLabelEdit(e)

Fires the [BeforeLabelEdit](#beforelabeledit) event.

| Parameter | Type                                                                                                                     | Description                                                                                                                                              |
| --------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [NodeLabelEditEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.nodelabelediteventargs) | A [NodeLabelEditEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.nodelabelediteventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnBeforeSelect(e)

Fires the [BeforeSelect](#beforeselect) event.

| Parameter | Type                                                                                                                       | Description                                                                                                                                                |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewCancelEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) | A [TreeViewCancelEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnCreateControl()

Creates and register this control and all its children.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnItemDrag(e)

![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-72ee9aade2e798319ef8cd025a59345103436978%2Fdeprecated.png?alt=media)**Deprecated**: This method is deprecated. Use OnNodeDrag instead.\
Fires the [ItemDrag](#itemdrag) event.

| Parameter | Type                                                                                                           | Description                                                                                                                                     |
| --------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [ItemDragEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.itemdrageventargs) | An [ItemDragEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.itemdrageventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnNodeDrag(e)

Fires the [NodeDrag](#nodedrag) event.

| Parameter | Type                                                                                                                           | Description                                                                                                                                                     |
| --------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeViewNodeDragEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewnodedrageventargs) | An [TreeViewNodeDragEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewnodedrageventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnNodeMouseClick(e)

Fires the [NodeMouseClick](#nodemouseclick) event.

| Parameter | Type                                                                                                                               | Description                                                                                                                                                        |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **e**     | [TreeNodeMouseClickEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemouseclickeventargs) | A [TreeNodeMouseClickEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemouseclickeventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnNodeMouseDoubleClick(e)

Fires the [NodeMouseDoubleClick](#nodemousedoubleclick) event.

| Parameter | Type                                                                                                                               | Description                                                                                                                                                        |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **e**     | [TreeNodeMouseClickEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemouseclickeventargs) | A [TreeNodeMouseClickEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemouseclickeventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnNodeMouseHover(e)

Fires the [NodeMouseHover](#nodemousehover) event.

| Parameter | Type                                                                                                                               | Description                                                                                                                                                          |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeNodeMouseHoverEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemousehovereventargs) | The [TreeNodeMouseHoverEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemousehovereventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnNodeMouseLeave(e)

Fires the [NodeMouseLeave](#nodemouseleave) event.

| Parameter | Type                                                                                                                               | Description                                                                                                                                                          |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TreeNodeMouseHoverEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemousehovereventargs) | The [TreeNodeMouseHoverEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemousehovereventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnToolClick(e)

Fires the ToolClick event.

| Parameter | Type                                                                                            | Description                                                                                                                     |
| --------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [ToolClickEventArgs](https://docs.wisej.com/api/wisej.web/editors/wisej.web.toolclickeventargs) | A [ToolClickEventArgs](https://docs.wisej.com/api/wisej.web/editors/wisej.web.toolclickeventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                                           | Description      |
| --------- | ------------------------------------------------------------------------------ | ---------------- |
| **e**     | [WisejEventArgs](https://docs.wisej.com/api/wisej.core/general/wisejeventargs) | Event arguments. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebUpdate(state)

Updates the client component using the state information.

| Parameter | Type                                                          | Description           |
| --------- | ------------------------------------------------------------- | --------------------- |
| **state** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic state object. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SetSelected(node, selected)

Selects or clears the selection for the specified [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) in a [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview).

| Parameter    | Type                                                                                         | Description                                                                                                                                                |
| ------------ | -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **node**     | [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) | The [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) to select.                                                |
| **selected** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                              | True to select the specified [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode), otherwise false to deselect it. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  The specified *node* is null.
* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The specified *node* is currently assigned to another [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview).
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The [SelectionMode](#selectionmode) property is set to None.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Sort()

Sorts the items in [TreeView](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview) control.

## Events

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AfterCheck

[TreeViewEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventhandler) Occurs after the tree node check box is checked.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AfterCollapse

[TreeViewEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventhandler) Occurs after the tree node is collapsed.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AfterExpand

[TreeViewEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventhandler) Occurs after the tree node is expanded.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AfterLabelEdit

[NodeLabelEditEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.nodelabelediteventhandler) Occurs after the tree node label text is edited.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AfterSelect

[TreeViewEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treevieweventhandler) Occurs after the tree node is selected.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BeforeCheck

[TreeViewCancelEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventhandler) Occurs before the tree node check box is checked.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BeforeCollapse

[TreeViewCancelEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventhandler) Occurs before the tree node is collapsed.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BeforeExpand

[TreeViewCancelEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventhandler) Occurs before the tree node is expanded.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BeforeLabelEdit

[NodeLabelEditEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.nodelabelediteventhandler) Occurs before the tree node label text is edited.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BeforeSelect

[TreeViewCancelEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventhandler) Occurs before the tree node is selected.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ItemDrag

![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-72ee9aade2e798319ef8cd025a59345103436978%2Fdeprecated.png?alt=media)**Deprecated**: This event is deprecated. Use NodeDrag instead.[ItemDragEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.itemdrageventhandler) Fired when the user begins dragging a node.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NodeDrag

[TreeViewNodeDragEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewnodedrageventhandler) Fired when the user begins dragging a node.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NodeMouseClick

[TreeNodeMouseClickEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemouseclickeventhandler) Fired when the user clicks a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) with the mouse.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NodeMouseDoubleClick

[TreeNodeMouseClickEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemouseclickeventhandler) Fired when the user double-clicks a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode) with the mouse.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NodeMouseHover

[TreeNodeMouseHoverEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemousehovereventhandler) Fired when the mouse hovers over a [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) NodeMouseLeave

[TreeNodeMouseHoverEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodemousehovereventhandler) Fired when the mouse leaves the [TreeNode](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ToolClick

[ToolClickEventHandler](https://docs.wisej.com/api/wisej.web/editors/wisej.web.toolclickeventhandler) Fired when a [ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool) is clicked.

## Implements

| Name                                                                                                 | Description                                                                                                                              |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| [IUserData](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.                          |
| [IBindableComponent](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                            |
| [IDropTarget](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idroptarget)                 | Controls that support drag & drop operations implement this interface.                                                                   |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                           |
| [IWisejControl](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/wisej.web/general/control) class must implement this interface. |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                                                    |
