# DataGridViewCell

Namespace: **Wisej.Web**

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

* [DataGridViewElement](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement)
  * [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell)

Represents an individual cell in a [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control.

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

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

{% endtab %}

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

```visual-basic
Public Class DataGridViewCell
    Inherits DataGridViewElement
    Implements ICloneable
```

{% endtab %}
{% endtabs %}

## Constructors

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

## Properties

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception) [ColumnIndex](#columnindex) is less than 0, indicating that the cell is a row header cell.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/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/en-us/dotnet/api/system.exception) Formatting failed and either there is no handler for the [DataError](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/..#dataerror) event of the [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control or the handler set the [ThrowException](https://docs.wisej.com/api/v2.2/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/en-us/dotnet/api/system.formatexception).

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

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

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

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

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

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

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

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

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

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

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

[DataGridViewElementStates](https://docs.wisej.com/api/v2.2/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/en-us/dotnet/api/system.argumentexception) The cell is not contained within a [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control and the value of its [RowIndex](#rowindex) property is not -1.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception) The cell is contained within a [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control and the value of its [RowIndex](#rowindex) property is -1.

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

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

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception) The cell does not belong to a [DataGridView](https://docs.wisej.com/api/v2.2/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/en-us/dotnet/api/system.argumentoutofrangeexception) The row containing the cell is a shared row; or the cell is a column header cell.

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

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

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

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

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

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

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

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

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

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): Returns the index of the cell's parent row.

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

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

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

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

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

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

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

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

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

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

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

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

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

[Boolean](https://docs.microsoft.com/en-us/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/v2.2/wisej.web/lists-and-grids/datagridview/..#cellpaint) event to draw custom content in the cell.

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

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

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/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/en-us/dotnet/api/system.invalidoperationexception) [ColumnIndex](#columnindex) is less than 0, indicating that the cell is a row header cell.

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

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

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

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

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

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

## Methods

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

Creates a copy of this cell.

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

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%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/en-us/dotnet/api/system.object). The current, formatted value of the [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell).

**Throws:**

* [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) Formatting failed and either there is no handler for the [DataError](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/..#dataerror) event of the [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control or the handler set the [ThrowException](https://docs.wisej.com/api/v2.2/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/en-us/dotnet/api/system.formatexception).

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

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

| Parameter    | Type                                                              | Description                               |
| ------------ | ----------------------------------------------------------------- | ----------------------------------------- |
| **rowIndex** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | The index of the row containing the cell. |

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

**Throws:**

* [ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception) The cell is not contained within a [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control and *rowIndex* is not -1 or *rowIndex* is not the index of the row containing this cell.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception) The cell is contained within a [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control and *rowIndex* is outside the valid range of 0 to the number of rows in the control minus 1.

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%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/en-us/dotnet/api/system.boolean) | true to include inherited visual properties; otherwise, false to include only formatting properties. |

**Returns:** [DataGridViewCellStyle](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle). A [DataGridViewCellStyle](https://docs.wisej.com/api/v2.2/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/v2.2/wisej.web/lists-and-grids/datagridview).

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception) The cell has no associated [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview).

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%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/en-us/dotnet/api/system.object)                                                             | The display value of the cell.                                                                                                                                       |
| **cellStyle**              | [DataGridViewCellStyle](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) | The [DataGridViewCellStyle](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) in effect for the cell.          |
| **formattedTypeConverter** | [TypeConverter](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.typeconverter)                                | A [TypeConverter](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.typeconverter) for the display value type, or null to use the default converter. |
| **valueTypeConverter**     | [TypeConverter](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.typeconverter)                                | A [TypeConverter](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.typeconverter) for the cell value type, or null to use the default converter.    |

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

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception) *cellStyle* is null.
* [FormatException](https://docs.microsoft.com/en-us/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/en-us/dotnet/api/system.argumentexception) *value* is null or the type of *value* does not match the type indicated by the [FormattedValueType](#formattedvaluetype) property.

### ![](https://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%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://1958722042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-3433078682%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/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewbuttoncell)                 | Displays a button widget in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell.                                                                                                                    |
| [DataGridViewCheckBoxCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcheckboxcell)             | Displays a [CheckBox](https://docs.wisej.com/api/v2.2/wisej.web/buttons/wisej.web.checkbox) icon (not the actual control) in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell.                   |
| [DataGridViewComboBoxCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell)             | Displays an editable [ComboBox](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/wisej.web.combobox) control in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.     |
| [DataGridViewDateTimePickerCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell) | Displays an editable [DateTimePicker](https://docs.wisej.com/api/v2.2/wisej.web/editors/wisej.web.datetimepicker) control in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode. |
| [DataGridViewImageCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell)                   | Displays an image in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell.                                                                                                                           |
| [DataGridViewLinkCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewlinkcell)                     | Displays a link widget in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell.                                                                                                                      |
| [DataGridViewMaskedTextBoxCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxcell)   | Displays an editable [MaskedTextBox](https://docs.wisej.com/api/v2.2/wisej.web/editors/wisej.web.maskedtextbox) control in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.   |
| [DataGridViewNumericUpDownCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell)   | Displays an editable [NumericUpDown](https://docs.wisej.com/api/v2.2/wisej.web/editors/wisej.web.numericupdown) control in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.   |
| [DataGridViewTextBoxCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell)               | Displays an editable [TextBox](https://docs.wisej.com/api/v2.2/wisej.web/editors/wisej.web.textbox) control in a [DataGridViewCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.               |
| [DataGridViewColumnHeaderCell](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumnheadercell)     | Represents a column header in a [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                              |
| [DataGridViewHeaderCell](https://docs.wisej.com/api/v2.2/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/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewrowheadercell)           | Represents a row header of a [DataGridView](https://docs.wisej.com/api/v2.2/wisej.web/lists-and-grids/datagridview) control.                                                                                                                                                 |


---

# 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/v2.2/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell.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.
