Skip to main content
A newer version of this page is available. .

PropertyMetadataBuilderExtensions.DateTimeDataType<T>(PropertyMetadataBuilder<T, Nullable<DateTime>>, DateTimeDisplayMode) Method

Configures the property editor to display date-time values.

Namespace: DevExpress.Mvvm.DataAnnotations

Assembly: DevExpress.Mvvm.v18.2.dll

Declaration

public static PropertyMetadataBuilder<T, DateTime?> DateTimeDataType<T>(
    this PropertyMetadataBuilder<T, DateTime?> builder,
    DateTimeDisplayMode displayMode = DateTimeDisplayMode.Date
)

Parameters

Name Type Description
builder PropertyMetadataBuilder<T, Nullable<DateTime>>

A property metadata builder.

Optional Parameters

Name Type Default Description
displayMode DateTimeDisplayMode 0

The required DateTimeDisplayMode value.

Type Parameters

Name
T

Returns

Type Description
PropertyMetadataBuilder<T, Nullable<DateTime>>

The property metadata builder instance.

Remarks

The DateTimeDataType<T> property is recognized by the GridControl, TreeListControl, DataLayoutControl and PropertyGridControl.

Using the DateTimeDataType<T> method is equivalent to assigning the [DataType(DataType.DateTime)] data annotation attribute to a data property.

See Also