# DataGridViewCellValidatingEventHandler

Namespace: **Wisej.Web**

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

Represents the method that will handle the [CellValidating](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellvalidating) event of a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.

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

```csharp
public delegate void DataGridViewCellValidatingEventHandler(Object sender, DataGridViewCellValidatingEventArgs e)
```

{% endtab %}

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

```visual-basic
Public Delegate Sub DataGridViewCellValidatingEventHandler(ByVal sender As [Object], ByVal e As DataGridViewCellValidatingEventArgs)
```

{% endtab %}
{% endtabs %}

## Parameters

| Name       | Type                                                                                                                                                   | Description                                                                                                                                                                            |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **sender** | [Object](https://docs.microsoft.com/dotnet/api/system.object)                                                                                          | A reference to the event sender.                                                                                                                                                       |
| **e**      | [DataGridViewCellValidatingEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellvalidatingeventargs) | A [DataGridViewCellValidatingEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellvalidatingeventargs) that contains the event data. |

## Fired By

| Name                                                                                                               | Description                                                       |
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- |
| [DataGridView.CellValidating](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellvalidating) | Fired when a cell loses input focus, enabling content validation. |
