# DataGridViewTextBoxEditingControl

Namespace: **Wisej.Web**

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

* [Control](https://docs.wisej.com/api/wisej.web/general/control)
  * [TextBoxBase](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textboxbase)
    * [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox)
      * [DataGridViewTextBoxEditingControl](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxeditingcontrol)

Represents a [TextBox](https://docs.wisej.com/api/wisej.web/editors/wisej.web.textbox) control that can be hosted in a [DataGridViewTextBoxCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell) cell when the cell's [WrapMode](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewcellstyle#wrapmode) is set to [False](https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.datagridviewtristate#fields).

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

```csharp
public class DataGridViewTextBoxEditingControl : TextBox, IDataGridViewEditingControl
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewTextBoxEditingControl
    Inherits TextBox
    Implements IDataGridViewEditingControl
```

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

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

## Properties

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

[DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview): Returns or sets the [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview) that contains the text box control.

## 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) ApplyCellStyleToEditingControl(style)

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

| Parameter | Type                                                                                                                       | Description                                                                                                                                                               |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **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) in effect for the cell entering 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) 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.

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

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) |             |

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

Prepares the currently selected cell for editing.

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

## Implements

| Name                                                                                                                                   | Description                                                                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IDataGridViewEditingControl](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.idatagridvieweditingcontrol) | Defines common functionality for controls that are hosted within cells of a [DataGridView](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview).                                                                                                    |
| [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.                                                                                                                                                   |
| [IBindableComponent](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.ibindablecomponent)                                   | Bindable components implement this interface.                                                                                                                                                                                                                     |
| [IDropTarget](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idroptarget)                                                   | Controls that support drag & drop operations implement this interface.                                                                                                                                                                                            |
| [ILabel](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ilabel)                                                             | Provides access to the [LabelWrapper](https://docs.wisej.com/api/wisej.web/editors/wisej.web.labelwrapper) associated with the controls that implement this interface.                                                                                            |
| [IReadOnly](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ireadonly)                                                       | Provides access to the [ReadOnly](https://docs.wisej.com/api/interfaces/wisej.web.ireadonly#readonly) property for coontrols that support the read-only mode.                                                                                                     |
| [IModified](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.imodified)                                                       | Provides access to the [Modified](https://docs.wisej.com/api/interfaces/wisej.web.imodified#modified) property and [ModifiedChanged](https://docs.wisej.com/api/interfaces/wisej.web.imodified#modifiedchanged) event for controls that implement this interface. |
| [IValidation](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ivalidation)                                                   | Provides access to the validation events and properties property for controls that support validation.                                                                                                                                                            |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)                                         | All wisej components implement this interface.                                                                                                                                                                                                                    |
| [IWisejControl](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcontrol)                                             | All wisej controls derived from the [Control](https://docs.wisej.com/api/wisej.web/general/control) class must implement this interface.                                                                                                                          |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable)                                   | Allows an object to serialize itself.                                                                                                                                                                                                                             |
