> For the complete documentation index, see [llms.txt](https://docs.wisej.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs.md).

# TreeViewCancelEventArgs

Namespace: **Wisej.Web**

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

Provides data for the [BeforeCheck](/api/wisej.web/lists-and-grids/treeview.md#beforecheck), [BeforeCollapse](/api/wisej.web/lists-and-grids/treeview.md#beforecollapse), [BeforeExpand](/api/wisej.web/lists-and-grids/treeview.md#beforeexpand), and [BeforeSelect](/api/wisej.web/lists-and-grids/treeview.md#beforeselect) events of a [TreeView](/api/wisej.web/lists-and-grids/treeview.md) 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

### ![](/files/hsR4ok3152WyAf8J2C1u) TreeViewCancelEventArgs(node, cancel, action)

Initializes a new instance of the [TreeViewCancelEventArgs](/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs.md) 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](/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode.md)             | The [TreeNode](/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode.md) 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](/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction.md) | One of the [TreeViewAction](/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction.md) values indicating the type of action that raised the event. |

### ![](/files/hsR4ok3152WyAf8J2C1u) TreeViewCancelEventArgs(nodes, cancel, action)

Initializes a new instance of the [TreeViewCancelEventArgs](/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs.md) 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\[\]](/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode.md)         | An array of [TreeNode](/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode.md) 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](/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction.md) | One of the [TreeViewAction](/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewaction.md) values indicating the type of action that raised the event. |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) Action

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

### ![](/files/hsR4ok3152WyAf8J2C1u) Node

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

### ![](/files/hsR4ok3152WyAf8J2C1u) Nodes

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

## Used By

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treeviewcanceleventargs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
