Skip to main content
All docs
V25.1
  • DxSpinEditSettings.Mask Property

    Specifies a mask pattern.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(null)]
    [Parameter]
    public string Mask { get; set; }

    Property Value

    Type Default Description
    String null

    The mask pattern.

    Remarks

    An input mask is used when a string entered by a user should comply with a specific format.

    To define an input mask, assign a mask pattern to the Mask property. You can use predefined mask patterns, standard numeric .NET formats, or custom numeric format strings to specify the mask. Note that display values depend on the current culture. For example, the same input mask may define different settings for the U.S. and Germany (currency symbol, thousand separator, precision, and so on). For more information on available mask patterns, refer to the following topic: Numeric Masks.

    In the following code snippet, the Mask property value forces the editor to display the currency character in edit mode.

    <DxGrid Data="@products" ShowFilterRow="true" PageSize="4"
            EditMode="GridEditMode.EditRow">
        <Columns>
            <DxGridCommandColumn />
            <DxGridDataColumn FieldName="ProductID" Width="140px" />
            <DxGridDataColumn FieldName="ProductName" />
            <DxGridDataColumn FieldName="UnitPrice" Width="140px" DisplayFormat="c" >
                <EditSettings>
                    <DxSpinEditSettings Mask="@NumericMask.Currency" />
                </EditSettings>
            </DxGridDataColumn>
            <DxGridDataColumn FieldName="UnitsInOrder"  Width="140px" />
        </Columns>
    </DxGrid>
    

    Input Mask

    Use the MaskProperties property to additionally configure mask settings: specify the current culture and validation message.

    To change the input mask at runtime, use the ISpinEditSettings.Mask property instead.

    Implements

    See Also