DxSpinEdit<T>.BindValueMode Property

Specifies how to update the editor value when it is bound to a property/field.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
[DefaultValue(BindValueMode.OnLostFocus)]
public BindValueMode BindValueMode { get; set; }

Property Value

Type Default Description
BindValueMode

OnLostFocus

A BindValueMode enumeration value.

Available values:

Name Description
OnLostFocus

The editor value is updated after the editor loses focus.

OnInput

The editor value is updated when the input value changes.

Remarks

Use the @bind attribute to bind the Value property to a field. When the editor is rendered, its input value comes from the bound field.

The Value property is updated after a user changes the input value and removes focus (OnLostFocus mode).

Spin Edit BindValueMode OnLostFocus

Set the BindValueMode property to OnInput to update the Value property when a user changes the input value.

<DxSpinEdit @bind-Value="@Year" BindValueMode="BindValueMode.OnInput" NullText="Type a value..." />

@code {
    int? Year { get; set; } = DateTime.Now.Year;
}

Spin Edit BindValueMode OnInput

Run Demo: Spin Edit - Bind Value On Input Change

See Also