# DataGridViewTextBoxEditingControl

URL: https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxeditingcontrol

Version: 4.1
Namespace: **Wisej.Web**

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

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

- C# - VB.NET

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

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

## Constructors

### ![Instance member](/img/api/instance.png) DataGridViewTextBoxEditingControl()

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

## Properties

### ![Instance member](/img/api/instance.png) DataGridView

DataGridView : Returns or sets theDataGridView that contains the text box control.

## Methods

### ![Instance member](/img/api/instance.png) 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) | The [DataGridViewCellStyle](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle) in effect for the cell entering edit mode. 

### ![Instance member](/img/api/instance.png) 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.

### ![Protected member](/img/api/protected.png) OnTextChanged(e)

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

### ![Instance member](/img/api/instance.png) 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](/api/wisej.web/lists-and-grids/datagridview/wisej.web.idatagridvieweditingcontrol) | Defines common functionality for controls that are hosted within cells of aDataGridView . | [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata) | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. | [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface. | [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget) | Controls that support drag & drop operations implement this interface. | [ILabel](/api/wisej.web/interfaces/wisej.web.ilabel) | Provides access to the [LabelWrapper](/api/wisej.web/editors/wisej.web.labelwrapper) associated with the controls that implement this interface. | [IReadOnly](/api/wisej.web/interfaces/wisej.web.ireadonly) | Provides access to the [ReadOnly](/api/wisej.web/interfaces/wisej.web.ireadonly#readonly) property for coontrols that support the read-only mode. | [IModified](/api/wisej.web/interfaces/wisej.web.imodified) | Provides access to the [Modified](/api/wisej.web/interfaces/wisej.web.imodified#modified) property and [ModifiedChanged](/api/wisej.web/interfaces/wisej.web.imodified#modifiedchanged) event for controls that implement this interface. | [IValidation](/api/wisej.web/interfaces/wisej.web.ivalidation) | Provides access to the validation events and properties property for controls that support validation. | [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent) | All wisej components implement this interface. | [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol) | All wisej controls derived from theControl class must implement this interface. | [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.
