# DataGridViewMaskedTextBoxEditingControl

Namespace: **Wisej.Web**

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

* [Control](/api/v3.0/wisej.web/general/control.md)
  * [TextBoxBase](/api/v3.0/wisej.web/editors/wisej.web.textboxbase.md)
    * [MaskedTextBox](/api/v3.0/wisej.web/editors/maskedtextbox.md)
      * [DataGridViewMaskedTextBoxEditingControl](/api/v3.0/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxeditingcontrol.md)

Represents a [MaskedTextBox](/api/v3.0/wisej.web/editors/maskedtextbox.md) control that can be hosted in a [DataGridViewMaskedTextBoxCell](/api/v3.0/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxcell.md) cell.

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

```csharp
public class DataGridViewMaskedTextBoxEditingControl : MaskedTextBox, IDataGridViewEditingControl
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewMaskedTextBoxEditingControl
    Inherits MaskedTextBox
    Implements IDataGridViewEditingControl
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/uCY6T77rh488FWHzpJ6P)DataGridViewMaskedTextBoxEditingControl()

## Properties

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

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

### ![](/files/uCY6T77rh488FWHzpJ6P)TextLength

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): Returns the length of text in the control.

## Methods

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

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

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

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

Retrieves the formatted value of the cell.

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

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

Prepares the currently selected cell for editing.

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

## Implements

| Name                                                                                                                     | Description                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IDataGridViewEditingControl](/api/v3.0/wisej.web/lists-and-grids/datagridview/wisej.web.idatagridvieweditingcontrol.md) | Defines common functionality for controls that are hosted within cells of a [DataGridView](/api/v3.0/wisej.web/lists-and-grids/datagridview.md).                                                                                                          |
| [IBindableComponent](/api/v3.0/wisej.web/data-binding/wisej.web.ibindablecomponent.md)                                   | Bindable components implement this interface.                                                                                                                                                                                                             |
| [ILabel](/api/v3.0/wisej.web/interfaces/wisej.web.ilabel.md)                                                             | Provides access to the [LabelWrapper](/api/v3.0/wisej.web/editors/wisej.web.labelwrapper.md) associated with the controls that implement this interface.                                                                                                  |
| [IReadOnly](/api/v3.0/wisej.web/interfaces/wisej.web.ireadonly.md)                                                       | Provides access to the [ReadOnly](/api/v3.0/wisej.web/interfaces/wisej.web.ireadonly.md#readonly) property for coontrols that support the read-only mode.                                                                                                 |
| [IModified](/api/v3.0/wisej.web/interfaces/wisej.web.imodified.md)                                                       | Provides access to the [Modified](/api/v3.0/wisej.web/interfaces/wisej.web.imodified.md#modified) property and [ModifiedChanged](/api/v3.0/wisej.web/interfaces/wisej.web.imodified.md#modifiedchanged) event for controls that implement this interface. |
| [IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md)                                         | All wisej components implement this interface.                                                                                                                                                                                                            |
| [IWisejControl](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcontrol.md)                                             | All wisej controls derived from the [Control](/api/v3.0/wisej.web/general/control.md) class must implement this interface.                                                                                                                                |
| [IWisejSerializable](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejserializable.md)                                   | Allows an object to serialize itself.                                                                                                                                                                                                                     |


---

# 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/v3.0/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxeditingcontrol.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.
