# DataGridViewToolClickEventArgs

Namespace: **Wisej.Web**

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

* [DataGridViewCellEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcelleventargs)
  * [DataGridViewToolClickEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtoolclickeventargs)

Provides data for the [CellToolClick](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#celltoolclick) event.

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

```csharp
public class DataGridViewToolClickEventArgs : DataGridViewCellEventArgs
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewToolClickEventArgs
    Inherits DataGridViewCellEventArgs
```

{% 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) DataGridViewToolClickEventArgs(item, columnIndex, rowIndex)

Initializes a new instance of the [ToolClickEventArgs](https://docs.wisej.com/api/wisej.web/editors/wisej.web.toolclickeventargs) class for the clicked [ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool).

| Name            | Type                                                                                  | Description                                                                                                       |
| --------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **item**        | [ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool) | The [ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool) to store in this event. |
| **columnIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                           | The index of the column containing the cell that the event occurs for.                                            |
| **rowIndex**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                           | The index of the row containing the cell that the event occurs for.                                               |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) *columnIndex* is less than -1, or *rowIndex* 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) DataGridViewToolClickEventArgs(item, cellAddress)

Initializes a new instance of the [ToolClickEventArgs](https://docs.wisej.com/api/wisej.web/editors/wisej.web.toolclickeventargs) class for the clicked [ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool).

| Name            | Type                                                                                  | Description                                                                                                       |
| --------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **item**        | [ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool) | The [ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool) to store in this event. |
| **cellAddress** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                   | The address of the cell that the event occurs for                                                                 |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) *cellAddress.X.X* is less than -1, or *cellAddress.Y.Y* is less than -1.

## 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) Tool

[ComponentTool](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttool): Returns the clicked tool item.

## Used By

| Name                                                                                                                                               | Description                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridViewToolClickEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtoolclickeventhandler) | Represents the method that will handle the [CellToolClick](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#celltoolclick) event. |
