PropertyMetadataBuilderExtensions.CurrencyDataType<T>(PropertyMetadataBuilder<T, Nullable<Decimal>>) Method
Configures the property editor to display currency values.
Namespace: DevExpress.Mvvm.DataAnnotations
Assembly: DevExpress.Mvvm.v24.1.dll
NuGet Packages: DevExpress.Mvvm, DevExpress.Win.Navigation
Declaration
public static PropertyMetadataBuilder<T, decimal?> CurrencyDataType<T>(
this PropertyMetadataBuilder<T, decimal?> builder
)
Parameters
Name | Type | Description |
---|---|---|
builder | PropertyMetadataBuilder<T, Nullable<Decimal>> | A property metadata builder. |
Type Parameters
Name |
---|
T |
Returns
Type | Description |
---|---|
PropertyMetadataBuilder<T, Nullable<Decimal>> | The property metadata builder instance. |
Remarks
The CurrencyDataType<T> property is recognized by the GridControl, TreeListControl, DataLayoutControl and PropertyGridControl.
See the example below:
builder.Property(x => x.NullableDecimalProperty)
.CurrencyDataType();
The currency symbol and its position depend on the current culture.
Using the CurrencyDataType<T> method is equivalent to assigning the [DataType(DataType.Currency)] data annotation attribute to a data property.
See Also