Back to Devexpress

DxMaskedInput<T>.ValueChanged Event

blazor-devexpress-dot-blazor-dot-dxmaskedinput-1-c653d053.md

latest1.4 KB
Original Source

DxMaskedInput<T>.ValueChanged Event

Fires after the Masked Input’s value changed.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public EventCallback<T> ValueChanged { get; set; }

Parameters

TypeDescription
T

A delegate method that accepts the editor value type as a parameter.

|

Remarks

Handle the ValueChanged event to respond to the value change. The following code snippet enables the Update Value button once a user changes the editor value.

razor
<DxMaskedInput Value="Value"
               ValueChanged="@((int newValue) => OnValueChanged(newValue))"
               Mask="@NumericMask.Currency">
</DxMaskedInput>
<DxButton Enabled="@IsEnabled">Update Value</DxButton>

@code {
    int Value = 0;
    bool IsEnabled = false;

    void OnValueChanged(int newValue)
    {
        Value = newValue;
        if (newValue != 0)
            IsEnabled = true;
        else IsEnabled = false;
    }
}

See Also

DxMaskedInput<T> Class

DxMaskedInput<T> Members

DevExpress.Blazor Namespace