# DataGridViewDateTimePickerEditingControl

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [DateTimePicker](/api/wisej.web/editors/wisej.web.datetimepicker.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).

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

```csharp
public class DataGridViewDateTimePickerEditingControl : DateTimePicker, IDataGridViewEditingControl
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewDateTimePickerEditingControl
    Inherits DateTimePicker
    Implements IDataGridViewEditingControl
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes a new instance of [DataGridViewDateTimePickerEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickereditingcontrol.md).

## 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 text box 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). An [String](https://docs.microsoft.com/dotnet/api/system.string) that represents the formatted version of the cell contents.

### ![](/files/lzopMboA31bVq8UIcbT3) OnValueChanged(e)

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

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

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