Back to Devexpress

DxSpinEdit<T>.DisplayFormat Property

blazor-devexpress-dot-blazor-dot-dxspinedit-1-6db9d9d2.md

latest2.0 KB
Original Source

DxSpinEdit<T>.DisplayFormat Property

Specifies the pattern used to format the Spin Edit’s display value when the editor is not focused.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue("")]
[Parameter]
public string DisplayFormat { get; set; }

Property Value

TypeDefaultDescription
StringString.Empty

The format pattern.

|

Remarks

Use the DisplayFormat property to format the Spin Edit’s display value when the editor is not focused. See the Standard Numeric Format Strings and Custom Numeric Format Strings help topics for additional information.

Note: The Spin Edit component is designed to display numeric values, so it only accepts numbers and a decimal separator. It automatically shows thousand separators based on the mask settings, but users cannot enter them manually.

The following example applies the currency format:

razor
<DxSpinEdit @bind-Value="@DecimalValue"
            DisplayFormat="C" />

@code {
    Decimal DecimalValue { get; set; } = 320.5m;
}

Run Demo: Spin Edit - Display Format

See Also

DxSpinEdit<T> Class

DxSpinEdit<T> Members

DevExpress.Blazor Namespace