blazor-devexpress-dot-blazor-dot-dxmaskedinput-1-c653d053.md
Fires after the Masked Input’s value changed.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public EventCallback<T> ValueChanged { get; set; }
| Type | Description |
|---|---|
| T |
A delegate method that accepts the editor value type as a parameter.
|
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.
<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