# DataGridViewRowEventArgs

Namespace: **Wisej.Web**

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

Provides data for row-related [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) events.

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

```csharp
public class DataGridViewRowEventArgs : EventArgs
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewRowEventArgs
    Inherits EventArgs
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DataGridViewRowEventArgs(dataGrid, rowIndex)

Initializes a new instance of the [DataGridViewRowEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewroweventargs) class.

| Name         | Type                                                                              | Description                                                                                                                                                  |
| ------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **dataGrid** | [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) | DataGridView that owns the row.                                                                                                                              |
| **rowIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                       | The index of the [DataGridViewRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow) that the event occurred for. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception) *dataGrid* is null.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) *rowIndex* is -1 or greater than the number of rows.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DataGridViewRowEventArgs(row)

Initializes a new instance of the [DataGridViewRowEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewroweventargs) class.

| Name    | Type                                                                                                           | Description                                                                                                                                     |
| ------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **row** | [DataGridViewRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow) | The [DataGridViewRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow) that the event occurred for. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception) *row* is null.

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Row

[DataGridViewRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow): Returns the [DataGridViewRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow) associated with the event.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RowIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns a value indicating the row index of the cell that the event occurs for.

## Used By

| Name                                                                                                                                   | Description                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridViewRowEventHandler](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewroweventhandler) | Represents the method that will handle row-related events of a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview). |
