# DataGridViewDataErrorEventArgs

Namespace: **Wisej.Web**

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

* [DataGridViewCellCancelEventArgs](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellcanceleventargs.md)
  * [DataGridViewDataErrorEventArgs](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdataerroreventargs.md)

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

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

```csharp
public class DataGridViewDataErrorEventArgs : DataGridViewCellCancelEventArgs
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewDataErrorEventArgs
    Inherits DataGridViewCellCancelEventArgs
```

{% endtab %}
{% endtabs %}

## Constructors

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

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

| Name            | Type                                                                | Description                                                                                                         |
| --------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **exception**   | [Exception](https://docs.microsoft.com/dotnet/api/system.exception) | The exception that occurred.                                                                                        |
| **columnIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)         | The column index of the cell that raised the [DataError](/api/wisej.web/lists-and-grids/datagridview.md#dataerror). |
| **rowIndex**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)         | The row index of the cell that raised the [DataError](/api/wisej.web/lists-and-grids/datagridview.md#dataerror).    |

## Properties

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

[Exception](https://docs.microsoft.com/dotnet/api/system.exception): Returns the exception that represents the error.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether to throw the exception after the [DataGridViewDataErrorEventHandler](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdataerroreventhandler.md) delegate is finished with it.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) When setting this property to true, the [Exception](#exception) property value is null.

## Used By

| Name                                                                                                                            | Description                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridViewDataErrorEventHandler](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdataerroreventhandler.md) | Represents the method that will handle the [DataError](/api/wisej.web/lists-and-grids/datagridview.md#dataerror) 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.datagridviewdataerroreventargs.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.
