# ItemDragEventArgs

Namespace: **Wisej.Web**

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

Provides data for the [ItemDrag](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/..#itemdrag) event of the [TreeView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview) controls.

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

```csharp
public class ItemDragEventArgs : EventArgs
```

{% endtab %}

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

```visual-basic
Public Class ItemDragEventArgs
    Inherits EventArgs
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes a new instance of the [ItemDragEventArgs](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/wisej.web.itemdrageventargs) class with a specified mouse button.

| Name       | Type                                                                                          | Description                                                                                                                                                            |
| ---------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **button** | [MouseButtons](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.mousebuttons) | A combination of [MouseButtons](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.mousebuttons) values that indicates which mouse buttons were pressed. |

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ItemDragEventArgs(button, node)

Initializes a new instance of the [ItemDragEventArgs](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/wisej.web.itemdrageventargs) class with a specified mouse button and the [TreeNode](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode) that is being dragged.

| Name       | Type                                                                                              | Description                                                                                                                                                            |
| ---------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **button** | [MouseButtons](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.mousebuttons)     | A combination of [MouseButtons](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.mousebuttons) values that indicates which mouse buttons were pressed. |
| **node**   | [TreeNode](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode) | The [TreeNode](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode) being dragged.                                                   |

## Properties

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

[MouseButtons](https://docs.wisej.com/api/v2.2/wisej.web/enumerations/wisej.web.mousebuttons): Returns a value that indicates which mouse buttons were pressed during the drag operation.

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

[TreeNode](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode): Returns the [TreeNode](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/wisej.web.treenode) that is being dragged.

## Used By

| Name                                                                                                                      | Description                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ItemDragEventHandler](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/wisej.web.itemdrageventhandler) | Represents the method that will handle the [ItemDrag](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview/..#itemdrag) event of a [TreeView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/treeview) control. |
