# DataGridViewDateTimePickerColumn

Namespace: **Wisej.Web**

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

* [DataGridViewElement](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement.md)
  * [DataGridViewBand](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md)
    * [DataGridViewColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn.md)
      * [DataGridViewDateTimePickerColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercolumn.md)

Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewDateTimePickerCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell.md) cells.

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

```csharp
public class DataGridViewDateTimePickerColumn : DataGridViewColumn
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewDateTimePickerColumn
    Inherits DataGridViewColumn
```

{% endtab %}
{% endtabs %}

## Constructors

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

Initializes a new instance of the [DataGridViewDateTimePickerColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercolumn.md) class to the default state.

### ![](/files/hsR4ok3152WyAf8J2C1u) DataGridViewDateTimePickerColumn(cellTemplate)

Initializes a new instance of the [DataGridViewDateTimePickerColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercolumn.md) class to the default state.

| Name             | Type                                                                                                                      | Description                                                                                                                                                 |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **cellTemplate** | [DataGridViewDateTimePickerCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell.md) | An existing [DataGridViewDateTimePickerCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell.md) to use as a template. |

## Properties

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

[DataGridViewCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell.md): Returns or sets the template used to model cell appearance.

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The type is null.
* [InvalidCastException](https://docs.microsoft.com/dotnet/api/system.invalidcastexception)\
  The set type is not compatible with type [DataGridViewDateTimePickerCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell.md).

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

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

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

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

[DataGridViewCellStyle](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md): Returns or sets the column's default cell style.

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

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

This value is inherited by all the cells in the column that do not specify a value for this property.**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value of the [CellTemplate](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcolumn.md#celltemplate) property is null.

### ![](/files/hsR4ok3152WyAf8J2C1u) 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.

This value is inherited by all the cells in the column that do not specify a value for this property.**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The value assigned is not less than the [MaximumDateTime](/api/wisej.web/editors/wisej.web.datetimepicker.md#fields) value (12/31/9998).
* [SystemException](https://docs.microsoft.com/dotnet/api/system.systemexception)\
  The value assigned is less than the [MinimumDateTime](/api/wisej.web/editors/wisej.web.datetimepicker.md#fields) value (01/01/1753).
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value of the [CellTemplate](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcolumn.md#celltemplate) property is null.

### ![](/files/hsR4ok3152WyAf8J2C1u) 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.

This value is inherited by all the cells in the column that do not specify a value for this property.**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception)\
  The value assigned is not less than the [MaximumDateTime](/api/wisej.web/editors/wisej.web.datetimepicker.md#fields) value (12/31/9998).
* [SystemException](https://docs.microsoft.com/dotnet/api/system.systemexception)\
  The value assigned is less than the [MinimumDateTime](/api/wisej.web/editors/wisej.web.datetimepicker.md#fields) value (01/01/1753).
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value of the [CellTemplate](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcolumn.md#celltemplate) property is null.

### ![](/files/hsR4ok3152WyAf8J2C1u) 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`)

This value is inherited by all the cells in the column that do not specify a value for this property.**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  The value of the [CellTemplate](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcolumn.md#celltemplate) property is null.

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

[ComponentToolCollection](/api/wisej.web/editors/wisej.web.componenttoolcollection.md): Returns the instance of [ComponentToolCollection](/api/wisej.web/editors/wisej.web.componenttoolcollection.md) associated with this control.

## Implements

| Name                                                                              | Description                                                                                                     |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components 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.datagridviewdatetimepickercolumn.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.
