blazor-devexpress-dot-blazor-dot-dxspinedit-1-98b7269d.md
Fires after the Spin Edit’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.
<DxSpinEdit Value="@NumericValue" ValueChanged="@((int newValue) => OnValueChanged(newValue))"></DxSpinEdit>
<DxButton Enabled="@IsEnabled">Update Value</DxButton>
@code {
int NumericValue = 0;
bool IsEnabled = true;
void OnValueChanged(int newValue) {
NumericValue = newValue;
if (newValue != 0)
IsEnabled = false;
else IsEnabled = true;
}
}
You can also use the DevExpress.Blazor.DxSpinEdit`1.ValueChanging event to validate/cancel user input.
See Also