# DataGridViewElement

Namespace: **Wisej.Web**

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

Provides the base class for elements of a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.

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

```csharp
public class DataGridViewElement : IDisposable, IHasPropertyStore
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewElement
    Inherits IDisposable
    Implements IHasPropertyStore
```

{% 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) DataGridViewElement()

Initializes a new instance of [DataGridViewElement](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement).

## 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) DataGridView

[DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview): Returns the [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control associated with this element.

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

[DataGridViewElementStates](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelementstates): Returns the user interface (UI) state of the element.

## Methods

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

Releases all resources used by the [DataGridViewElement](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) Dispose(disposing)

Releases the resources used by the [DataGridViewElement](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement).

| Parameter     | Type                                                            | Description                                                                 |
| ------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true when this method is called by the application rather than a finalizer. |

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

Called when the element is associated with a different [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) RaiseCellClick(e)

Fires the [CellClick](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellclick) event.

| Parameter | Type                                                                                                                               | Description                                                                                                                                                        |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **e**     | [DataGridViewCellEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcelleventargs) | A [DataGridViewCellEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcelleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) RaiseCellValueChanged(e)

Fires the [CellValueChanged](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellvaluechanged) event.

| Parameter | Type                                                                                                                               | Description                                                                                                                                                        |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **e**     | [DataGridViewCellEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcelleventargs) | A [DataGridViewCellEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcelleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) RaiseDataError(e)

Fires the [DataError](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#dataerror) event.

| Parameter | Type                                                                                                                                         | Description                                                                                                                                                                  |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [DataGridViewDataErrorEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdataerroreventargs) | A [DataGridViewDataErrorEventArgs](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdataerroreventargs) that contains the event data. |

## Inherited By

| Name                                                                                                                                             | Description                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridViewButtonCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewbuttoncell)                     | Displays a button widget in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell.                                                                                                                                    |
| [DataGridViewButtonColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewbuttoncolumn)                 | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewButtonCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewbuttoncell) cells.                 |
| [DataGridViewCheckBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcheckboxcell)                 | Displays a [CheckBox](https://docs.wisej.com/api/wisej.web/buttons/wisej.web.checkbox) icon (not the actual control) in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell.                                        |
| [DataGridViewCheckBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcheckboxcolumn)             | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewCheckBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcheckboxcell) cells.             |
| [DataGridViewColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn)                             | Represents a column in a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                                                     |
| [DataGridViewComboBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell)                 | Displays an editable [ComboBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/combobox) control in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.                                    |
| [DataGridViewComboBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcolumn)             | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewComboBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell) cells.             |
| [DataGridViewDateTimePickerCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell)     | Displays an editable [DateTimePicker](https://docs.wisej.com/api/wisej.web/editors/wisej.web.datetimepicker) control in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.                      |
| [DataGridViewDateTimePickerColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercolumn) | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewDateTimePickerCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell) cells. |
| [DataGridViewImageCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell)                       | Displays an image in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell.                                                                                                                                           |
| [DataGridViewImageColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecolumn)                   | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewImageCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell) cells.                   |
| [DataGridViewLinkCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewlinkcell)                         | Displays a link widget in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell.                                                                                                                                      |
| [DataGridViewLinkColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewlinkcolumn)                     | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewLinkCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewlinkcell) cells.                     |
| [DataGridViewMaskedTextBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxcell)       | Displays an editable [MaskedTextBox](https://docs.wisej.com/api/wisej.web/editors/maskedtextbox) control in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.                                  |
| [DataGridViewMaskedTextBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxcolumn)   | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewTextBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell) cells.               |
| [DataGridViewNumericUpDownCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell)       | Displays an editable [NumericUpDown](https://docs.wisej.com/api/wisej.web/editors/wisej.web.numericupdown) control in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.                        |
| [DataGridViewNumericUpDownColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncolumn)   | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewNumericUpDownCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell) cells.   |
| [DataGridViewTextBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell)                   | Displays an editable [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) control in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.                                    |
| [DataGridViewTextBoxColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcolumn)               | Represents a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) column that contains a collection of [DataGridViewTextBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell) cells.               |
| [DataGridViewBand](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband)                                 | Represents a linear collection of elements in a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                              |
| [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell)                                 | Represents an individual cell in a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                                           |
| [DataGridViewColumnHeaderCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumnheadercell)         | Represents a column header in a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                                              |
| [DataGridViewHeaderCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewheadercell)                     | Contains functionality common to row header cells and column header cells.                                                                                                                                                                                                              |
| [DataGridViewRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow)                                   | Represents a row in a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                                                        |
| [DataGridViewRowHeaderCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrowheadercell)               | Represents a row header of a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                                                 |
| [DataGridViewSummaryRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewsummaryrow)                     | Represents a summary row in a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                                                |
