# DataGridViewCellFormattingEventHandler

Namespace: **Wisej.Web**

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

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

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

```csharp
public delegate void DataGridViewCellFormattingEventHandler(Object sender, DataGridViewCellFormattingEventArgs e)
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## Parameters

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

## Fired By

| Name                                                                                                               | Description                                                         |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
| [DataGridView.CellFormatting](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellformatting) | Fired when the contents of a cell need to be formatted for display. |
