# DataGridViewCellContextMenuNeededEventArgs

Namespace: **Wisej.Web**

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

* [DataGridViewCellEventArgs](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcelleventargs.md)
  * [DataGridViewCellContextMenuNeededEventArgs](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellcontextmenuneededeventargs.md)

Provides data for the [CellContextMenuNeeded](/api/wisej.web/lists-and-grids/datagridview.md#cellcontextmenuneeded) event.

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

```csharp
public class DataGridViewCellContextMenuNeededEventArgs : DataGridViewCellEventArgs
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) DataGridViewCellContextMenuNeededEventArgs(columnIndex, rowIndex)

Initializes a new instance of the [DataGridViewCellContextMenuNeededEventArgs](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellcontextmenuneededeventargs.md) class.

| Name            | Type                                                        | Description                                            |
| --------------- | ----------------------------------------------------------- | ------------------------------------------------------ |
| **columnIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The column index of cell that the event occurred for.  |
| **rowIndex**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The row index of the cell that the event occurred for. |

### ![](/files/hsR4ok3152WyAf8J2C1u) DataGridViewCellContextMenuNeededEventArgs(columnIndex, rowIndex, x, y)

Initializes a new instance of the [DataGridViewCellContextMenuNeededEventArgs](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellcontextmenuneededeventargs.md) class.

| Name            | Type                                                        | Description                                            |
| --------------- | ----------------------------------------------------------- | ------------------------------------------------------ |
| **columnIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The column index of cell that the event occurred for.  |
| **rowIndex**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The row index of the cell that the event occurred for. |
| **x**           | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The x-coordinate of the pointer relative to the cell.  |
| **y**           | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The y-coordinate of the pointer relative to the cell.  |

## Properties

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

[ContextMenu](/api/wisej.web/menus/wisej.web.contextmenu.md): Returns or sets the context menu for the cell that raised the [CellContextMenuNeeded](/api/wisej.web/lists-and-grids/datagridview.md#cellcontextmenuneeded) event.

## Used By

| Name                                                                                                                                                    | Description                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridViewCellContextMenuNeededEventHandler](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellcontextmenuneededeventhandler.md) | Represents the method that will handle a [CellContextMenuNeeded](/api/wisej.web/lists-and-grids/datagridview.md#cellcontextmenuneeded) event of a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md). |


---

# Agent Instructions: 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:

```
GET https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellcontextmenuneededeventargs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
