# DataGridViewCell

Namespace: **Wisej.Web**

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

* [DataGridViewElement](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement)
  * [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.

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

```csharp
public class DataGridViewCell : DataGridViewElement, ICloneable, ICommandSource, IUserData
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewCell
    Inherits DataGridViewElement
    Implements ICloneable, ICommandSource, IUserData
```

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

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

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns the name of the cell renderer to use on the client side to render the cell. If it's null or empty, it defaults to "Cell".

The name of the cell renderer can be a fully qualified class name (i.e. "wisej.web.datagrid.cellRenderer.Cell") or just the class name (i.e. "ImageCell") in which case the client library prepends "wisej.web.datagrid.cellRenderer".

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the column index for this cell.

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

[ICommand](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.icommand): Returns or sets the [ICommand](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.icommand) implementation to invoke. (Default: `null`)

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

[ContextMenu](https://docs.wisej.com/api/wisej.web/menus/wisej.web.contextmenu): Returns or sets the shortcut menu associated with the cell. (Default: `null`)

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

[Control](https://docs.wisej.com/api/wisej.web/general/control): Returns or sets a child control to display inside the cell.

### ![](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 [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns the default value for a cell in the row for new records.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value that indicates whether the cell is currently displayed.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns whether the cell can be edited.

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns the current, formatted value of the cell, regardless of whether the cell is in edit mode and the value has not been committed.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The row containing the cell is a shared row; or the cell is a column header cell.
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)[ColumnIndex](#columnindex) is less than 0, indicating that the cell is a row header cell.
* [Exception](https://docs.microsoft.com/dotnet/api/system.exception)\
  Formatting failed and either there is no handler for the [DataError](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#dataerror) event of the [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control or the handler set the [ThrowException](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewdataerroreventargs#throwexception) property to true. The exception object can typically be cast to type [FormatException](https://docs.microsoft.com/dotnet/api/system.formatexception).

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

[Type](https://docs.microsoft.com/dotnet/api/system.type): Returns the type of the cell's hosted editing control.

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text describing an error condition associated with the cell.

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns the value of the cell as formatted for display.

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)[ColumnIndex](#columnindex) is less than 0, indicating that the cell is a row header cell.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The row containing the cell is a shared row; or the cell is a column header cell.
* [Exception](https://docs.microsoft.com/dotnet/api/system.exception)\
  Formatting failed and either there is no handler for the [DataError](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#dataerror) event of the [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control or the handler set the [ThrowException](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewdataerroreventargs#throwexception) property to true. The exception object can typically be cast to type [FormatException](https://docs.microsoft.com/dotnet/api/system.formatexception).

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

[Type](https://docs.microsoft.com/dotnet/api/system.type): Returns the type of the formatted value associated with the cell.

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

[TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter): Returns the type converter to use to convert a formatted value to the cell's value type.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value indicating whether the cell is frozen.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns true it the [Style](#style) property has been set.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Checks if the [UserData](#userdata) dynamic object was created and has any value.

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the height of the cell.

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

[DataGridViewElementStates](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelementstates): Returns the current state of the cell as inherited from the state of its row and column.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The cell is not contained within a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control and the value of its [RowIndex](#rowindex) property is not -1.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The cell is contained within a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control and the value of its [RowIndex](#rowindex) property is -1.

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

[DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle): Returns the style currently applied to the cell.

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The cell does not belong to a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control; or [ColumnIndex](#columnindex) is less than 0, indicating that the cell is a row header cell.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The row containing the cell is a shared row; or the cell is a column header cell.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns whether this is the current cell in the [DataGridView](#datagridview).

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value indicating whether this cell is currently being edited.

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

[DataGridViewColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn): Returns the column that contains this cell.

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

[DataGridViewRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow): Returns the row that contains this cell.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the cell's data can be edited.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value indicating whether the cell can be resized.

### ![](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 the index of the cell's parent row.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the cell has been selected.

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

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns the size of the cell.

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

[DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle): Returns or sets the style for the cell.

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns or sets the object that contains supplemental data about the cell. (Default: `null`)

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

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the ToolTip text associated with this cell.

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns a dynamic object that can be used to store custom data in relation to this cell.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables the user paint feature for this cell. When UserPaint is true, the application can handle the [CellPaint](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellpaint) event to draw custom content in the cell. (Default: `False`)

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

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns or sets the value associated with this cell.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)[RowIndex](#rowindex) is outside the valid range of 0 to the number of rows in the control minus 1.
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)[ColumnIndex](#columnindex) is less than 0, indicating that the cell is a row header cell.

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

[Type](https://docs.microsoft.com/dotnet/api/system.type): Returns or sets the data type of the values in the cell.

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

[TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter): Return the type converter to use to convert the value in the cell to the formatted value.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value indicating whether the cell is in a row or column that has been hidden.

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

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the width of the cell.

## 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) Clone()

Creates a copy of this cell.

**Returns:** [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell). The cloned [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

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

Compares the new value being assigned to the cell with the previous value.

| Parameter    | Type                                                          | Description                                                     |
| ------------ | ------------------------------------------------------------- | --------------------------------------------------------------- |
| **newValue** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | New value being assigned to the cell.                           |
| **oldValue** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Current value assigned to the cell being replaced by *newValue* |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). `true` if *newValue* and *oldValue* are different.

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

Creates a new instance of the edit control used to edit values in this cell.

**Returns:** [Control](https://docs.wisej.com/api/wisej.web/general/control).

### ![](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 [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

| 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) GetClipboardContent(rowIndex, firstCell, lastCell, inFirstRow, inLastRow, format)

Returns the formatted value of the cell to copy to the [Clipboard](https://docs.wisej.com/api/wisej.web/general/wisej.web.clipboard).

| Parameter      | Type                                                            | Description                                                                                                          |
| -------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **rowIndex**   | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)     | The zero-based index of the row containing the cell.                                                                 |
| **firstCell**  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to indicate that the cell is in the first column of the region defined by the selected cells; otherwise, false. |
| **lastCell**   | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to indicate that the cell is the last column of the region defined by the selected cells; otherwise, false.     |
| **inFirstRow** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to indicate that the cell is in the first row of the region defined by the selected cells; otherwise, false.    |
| **inLastRow**  | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to indicate that the cell is in the last row of the region defined by the selected cells; otherwise, false.     |
| **format**     | [String](https://docs.microsoft.com/dotnet/api/system.string)   | The current format string of the cell.                                                                               |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). An [Object](https://docs.microsoft.com/dotnet/api/system.object) that represents the value of the cell to copy to the [Clipboard](https://docs.wisej.com/api/wisej.web/general/wisej.web.clipboard).

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)*rowIndex* is less than 0 or greater than or equal to the number of rows in the control.
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value of the cell's [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewelement#datagridview) property is null.-or-[ColumnIndex](#columnindex) is less than 0, indicating that the cell is a row header cell.
* [Exception](https://docs.microsoft.com/dotnet/api/system.exception)\
  Formatting failed and either there is no handler for the [DataError](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#dataerror) event of the [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control or the handler set the [ThrowException](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewdataerroreventargs#throwexception) property to true. The exception object can typically be cast to type [FormatException](https://docs.microsoft.com/dotnet/api/system.formatexception).

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

Returns the command bound to the cell.

**Returns:** [ICommand](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.icommand). The value contained in the [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

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

Returns the current, formatted value of the cell, regardless the cell being in edit mode.

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). The current, formatted value of the [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

**Throws:**

* [Exception](https://docs.microsoft.com/dotnet/api/system.exception)\
  Formatting failed and either there is no handler for the [DataError](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#dataerror) event of the [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control or the handler set the [ThrowException](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewdataerroreventargs#throwexception) property to true. The exception object can typically be cast to type [FormatException](https://docs.microsoft.com/dotnet/api/system.formatexception).

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

Returns a string that represents the error for the cell.

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string). A string that describes the error for the current [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

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

Returns the value of the cell formatted for the client.

| Parameter                                                                                                                                                                                                                | Type                                                                                                                       | Description                                                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **value**                                                                                                                                                                                                                | [Object](https://docs.microsoft.com/dotnet/api/system.object)                                                              | The value to be formatted.                                                                                                                                                                                       |
| **cellStyle** ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-912a3bc068ac1c69bcaa58145e4ee468ccd8a555%2Fbadge-byref.svg?alt=media) | [DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) | The [DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) in for the cell.                                                                  |
| **valueTypeConverter**                                                                                                                                                                                                   | [TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter)                                 | A [TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter) providing custom conversion from the formatted type to the value type, or null if no custom conversion is required. |
| **formattedTypeConverter**                                                                                                                                                                                               | [TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter)                                 | A [TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter) providing custom conversion from the value type to the formatted type, or null if no custom conversion is required. |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). The value of the cell or null if the cell does not belong to a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) control.

**Throws:**

* [Exception](https://docs.microsoft.com/dotnet/api/system.exception)\
  Formatting failed and there is no handler for the [DataError](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#dataerror) event of the [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) or the handler set the [ThrowException](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewdataerroreventargs#throwexception) property to true.

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

Returns the inherited [ContextMenu](#contextmenu) for the current cell.

**Returns:** [ContextMenu](https://docs.wisej.com/api/wisej.web/menus/wisej.web.contextmenu). A [ContextMenu](#contextmenu) instance if the [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell), or the owner [DataGridViewRow](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrow), or the owner [DataGridViewColumn](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn), or the owner [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) has a [ContextMenu](#contextmenu) assigned; otherwise, null.

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

Returns a value indicating the current state of the cell as inherited from the state of its row and column.

**Returns:** [DataGridViewElementStates](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelementstates). A combination of [DataGridViewElementStates](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelementstates) values representing the current state of the cell.

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

Returns the style applied to the cell.

| Parameter                   | Type                                                            | Description                                                                                          |
| --------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **includeVisualProperties** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to include inherited visual properties; otherwise, false to include only formatting properties. |

**Returns:** [DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle). A [DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) that includes the style settings of the cell inherited from the cell's parent row, column, and [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview).

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The cell has no associated [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) GetToolTipText()

Returns a string that represents the tooltip text for the cell.

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string). A string that describes the tooltip text for the current [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

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

Returns the value of the cell.

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). The value contained in the [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

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

Initializes the control used to edit the cell.

| Parameter  | Type                                                                                                                       | Description                                                                                                                                                                       |
| ---------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **editor** | [Control](https://docs.wisej.com/api/wisej.web/general/control)                                                            | The [Control](https://docs.wisej.com/api/wisej.web/general/control) that is used to edit the cell.                                                                                |
| **style**  | [DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) | The [DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) that is in effect for the cell entering edit mode. |

**Throws:**

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

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

Raised when the contents of a cell need to be formatted for display.

| Parameter | Type                                                                                                                                                   | Description                                                                                                                                                                            |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **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. |

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

Raised when the user clicks on a cell.

| 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) 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-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) OnDoubleClick(e)

Raised when the user double-clicks on a cell.

| 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-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) OnEnter(e)

Raised when the cell becomes the active cell.

| 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-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) OnKeyDown(e)

Raised when the user types on the keyboard while the grid has the focus and it's not in edit more.

| Parameter | Type                                                                                        | Description                                                                                                                 |
| --------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [KeyEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.keyeventargs) | A [KeyEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.keyeventargs) that contains the event data. |

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

Raised when the cell is not the active cell anymore.

| 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-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) OnMouseClick(e)

Raised when the user clicks or taps on a cell.

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

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

Raised when the user double-clicks or double-taps on a cell.

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

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

Converts a value to the actual cell value.

| Parameter                  | Type                                                                                                                       | Description                                                                                                                                                    |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **value**                  | [Object](https://docs.microsoft.com/dotnet/api/system.object)                                                              | The display value of the cell.                                                                                                                                 |
| **cellStyle**              | [DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) | The [DataGridViewCellStyle](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) in effect for the cell.         |
| **formattedTypeConverter** | [TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter)                                 | A [TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter) for the display value type, or null to use the default converter. |
| **valueTypeConverter**     | [TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter)                                 | A [TypeConverter](https://docs.microsoft.com/dotnet/api/system.componentmodel.typeconverter) for the cell value type, or null to use the default converter.    |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). The cell value.

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)*cellStyle* is null.
* [FormatException](https://docs.microsoft.com/dotnet/api/system.formatexception)\
  The [FormattedValueType](#formattedvaluetype) property value is null or the [ValueType](#valuetype) property value is null or *value* cannot be converted.
* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)*value* is null or the type of *value* does not match the type indicated by the [FormattedValueType](#formattedvaluetype) property.

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

Fires the [CellCommandChanged](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/..#cellcommandchanged) 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-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ResetReadOnly()

Resets the [ReadOnly](#readonly) state to inherit its value from the [OwningColumn](#owningcolumn), [OwningRow](#owningrow)and the [DataGridView](#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) SetCommand(command)

Sets the command for the cell.

| Parameter   | Type                                                                           | Description              |
| ----------- | ------------------------------------------------------------------------------ | ------------------------ |
| **command** | [ICommand](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.icommand) | The cell command to set. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). True if the value has been set, otherwise false.

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

Sets the value of the cell.

| Parameter | Type                                                          | Description            |
| --------- | ------------------------------------------------------------- | ---------------------- |
| **value** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The cell value to set. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). True if the value has been set, otherwise false.

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

Indicates whether the cell data should be updated on the client even if the user didn't change the value when editing.<mark style="color:blue;background-color:green;">Since 3.2.5</mark>

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true to force the cell to update the client.

Used to allow the server to update the cell after editing mode is terminated and the user didn't change anything. For example, a password cell can be obfuscated, or a custom cell may need to always format the rendered value when terminating edit mode.

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

Updates the cell on the client.

## 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.                                                                                                               |
| [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.                   |
| [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.               |
| [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. |
| [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.                                                                                                                      |
| [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.                                                                                                                 |
| [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.             |
| [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.   |
| [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.               |
| [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.                                                                                                                                                                                         |
| [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.                                                                                                                                            |

## Implements

| Name                                                                                       | Description                                                                                                            |
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| [IUserData](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)           | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.        |
| [ICommandSource](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.icommandsource) | Defines an object that can invoke a [Command](https://docs.wisej.com/api/interfaces/wisej.web.icommandsource#command). |
