# DataGridViewCellPaintEventHandler

Namespace: **Wisej.Web**

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

Represents the method that will handle [CellPaint](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellpaint) events.

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

```csharp
public delegate void DataGridViewCellPaintEventHandler(Object sender, DataGridViewCellPaintEventArgs e)
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## Parameters

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

## Fired By

| Name                                                                                                     | Description                                                                                                                                                               |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridView.CellPaint](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellpaint) | Fired when a cell with the property [UserPaint](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewcell#userpaint) set to true needs to be drawn. |
