# DataGridViewDateTimePickerCell

Namespace: **Wisej.Web**

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

* [DataGridViewElement](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement)
  * [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell)
    * [DataGridViewDateTimePickerCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell)

Displays an editable [DateTimePicker](https://docs.wisej.com/api/wisej.web/editors/wisej.web.datetimepicker) control in a [DataGridViewCell](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell) cell when in edit mode.

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

```csharp
public class DataGridViewDateTimePickerCell : DataGridViewCell
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewDateTimePickerCell
    Inherits DataGridViewCell
```

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

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

## 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) CustomFormat

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the custom date/time format string.

See [Custom Date and Time Format Strings](https://msdn.microsoft.com/en-us/library/8kb3ddd4\(v=vs.110\).aspx) for the supported format definitions.

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

[Type](https://docs.microsoft.com/dotnet/api/system.type): Returns the type of the cell's hosted editing control.

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

[DateTimePickerFormat](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.datetimepickerformat): Returns or sets the format of the date/time value displayed in the control. (Default: `DateTime`)

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

[DateTime](https://docs.microsoft.com/dotnet/api/system.datetime): Returns or sets the maximum date and time that can be selected in the control.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The value assigned is not less than the [MaximumDateTime](https://docs.wisej.com/api/editors/wisej.web.datetimepicker#fields) value (12/31/9998).
* [SystemException](https://docs.microsoft.com/dotnet/api/system.systemexception)\
  The value assigned is less than the [MinimumDateTime](https://docs.wisej.com/api/editors/wisej.web.datetimepicker#fields) value (01/01/1753).

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

[DateTime](https://docs.microsoft.com/dotnet/api/system.datetime): Returns or sets the minimum date and time that can be selected in the control.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The value assigned is not less than the [MaximumDateTime](https://docs.wisej.com/api/editors/wisej.web.datetimepicker#fields) value (12/31/9998).
* [SystemException](https://docs.microsoft.com/dotnet/api/system.systemexception)\
  The value assigned is less than the [MinimumDateTime](https://docs.wisej.com/api/editors/wisej.web.datetimepicker#fields) value (01/01/1753).

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

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value indicating if a spin button control (up-down control) is displayed and can be used to adjust the date/time value. (Default: `False`)

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

[ComponentToolCollection](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttoolcollection): Returns the instance of [ComponentToolCollection](https://docs.wisej.com/api/wisej.web/editors/wisej.web.componenttoolcollection) associated with this cell.

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

[Type](https://docs.microsoft.com/dotnet/api/system.type): Returns or sets the data type of the values in the cell.

## Implements

| Name                                                                                       | Description                                                                                                            |
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| [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.        |
| [ICommandSource](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.icommandsource) | Defines an object that can invoke a [Command](https://docs.wisej.com/api/interfaces/wisej.web.icommandsource#command). |
