# TreeViewCancelEventArgs

Namespace: **Wisej.Web**

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

Provides data for the [BeforeCheck](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/..#beforecheck), [BeforeCollapse](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/..#beforecollapse), [BeforeExpand](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/..#beforeexpand), and [BeforeSelect](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/..#beforeselect) events of a [TreeView](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview) control.

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

```csharp
public class TreeViewCancelEventArgs : CancelEventArgs
```

{% endtab %}

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

```visual-basic
Public Class TreeViewCancelEventArgs
    Inherits CancelEventArgs
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)TreeViewCancelEventArgs(node, cancel, action)

Initializes a new instance of the [TreeViewCancelEventArgs](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) class with the specified tree node, a value specifying whether the event is to be canceled, and the type of tree view action that raised the event.

| Name       | Type                                                                                                          | Description                                                                                                                                                                          |
| ---------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **node**   | [TreeNode](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode)             | The [TreeNode](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode) that the event is responding to.                                               |
| **cancel** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                               | true to cancel the event; otherwise, false.                                                                                                                                          |
| **action** | [TreeViewAction](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction) | One of the [TreeViewAction](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction) values indicating the type of action that raised the event. |

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)TreeViewCancelEventArgs(nodes, cancel, action)

Initializes a new instance of the [TreeViewCancelEventArgs](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs) class with the specified tree node, a value specifying whether the event is to be canceled, and the type of tree view action that raised the event.

| Name       | Type                                                                                                          | Description                                                                                                                                                                          |
| ---------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **nodes**  | [TreeNode\[\]](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode)         | An array of [TreeNode](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode) that the event is responding to.                                       |
| **cancel** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                               | true to cancel the event; otherwise, false.                                                                                                                                          |
| **action** | [TreeViewAction](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction) | One of the [TreeViewAction](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction) values indicating the type of action that raised the event. |

## Properties

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Action

[TreeViewAction](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction): Returns the type of action that raised the event.

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Node

[TreeNode](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode): Returns the tree node that has been checked, expanded, collapsed, or selected.

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Nodes

[TreeNode\[\]](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode): Returns the tree nodes that has been selected in a multiselection treeview.

## Used By

| Name                                                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [TreeViewCancelEventHandler](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventhandler) | Represents the method that will handle the [BeforeCheck](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/..#beforecheck), [BeforeCollapse](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/..#beforecollapse), [BeforeExpand](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/..#beforeexpand), or [BeforeSelect](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview/..#beforeselect) event of a [TreeView](https://docs.wisej.com/api/v3.2/wisej.web/lists-and-grids/treeview). |
