# IDataGridViewEditingControl

Namespace: **Wisej.Web**

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

Defines common functionality for controls that are hosted within cells of a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md).

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

```csharp
public interface IDataGridViewEditingControl
```

{% endtab %}

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

```visual-basic
Public Interface IDataGridViewEditingControl
```

{% endtab %}
{% endtabs %}

## Properties

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

[DataGridView](/api/wisej.web/lists-and-grids/datagridview.md): Returns or sets the [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) that contains the cell.

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns the invalid state of the editing control.

## Methods

### ![](/files/hsR4ok3152WyAf8J2C1u) ApplyCellStyleToEditingControl(style)

Adapts the edit control's properties to be consistent with the specified cell style.

| Parameter | Type                                                                                                    | Description                                                                                                                                            |
| --------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **style** | [DataGridViewCellStyle](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md) | The [DataGridViewCellStyle](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md) in effect for the cell entering edit mode. |

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

Retrieves the formatted value of the cell.

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string). The formatted version of the cell's value.

### ![](/files/hsR4ok3152WyAf8J2C1u) PrepareEditingControlForEdit(selectAll)

Prepares the edit control or the cell for editing.

| Parameter     | Type                                                            | Description                                                 |
| ------------- | --------------------------------------------------------------- | ----------------------------------------------------------- |
| **selectAll** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true to select all of the cell's content; otherwise, false. |

## Implemented By

| Name                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridViewComboBoxEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxeditingcontrol.md)             | Represents a [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) control that can be hosted in a [DataGridViewComboBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell.md).                                                                                                                                                                                                                                |
| [DataGridViewDateTimePickerEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickereditingcontrol.md) | Represents a [DateTimePicker](/api/wisej.web/editors/wisej.web.datetimepicker.md) control that can be hosted in a [DataGridViewDateTimePickerCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell.md).                                                                                                                                                                                                      |
| [DataGridViewMaskedTextBoxEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxeditingcontrol.md)   | Represents a [MaskedTextBox](/api/wisej.web/editors/maskedtextbox.md) control that can be hosted in a [DataGridViewMaskedTextBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxcell.md) cell.                                                                                                                                                                                                               |
| [DataGridViewNumericUpDownEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowneditingcontrol.md)   | Represents a [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md) control that can be hosted in a [DataGridViewNumericUpDownCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell.md).                                                                                                                                                                                                          |
| [DataGridViewTextBoxEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxeditingcontrol.md)               | Represents a [TextBox](/api/wisej.web/editors/wisej.web.textbox.md) control that can be hosted in a [DataGridViewTextBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell.md) cell when the cell's [WrapMode](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md#wrapmode) is set to [False](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtristate.md#fields). |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.idatagridvieweditingcontrol.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.
