Skip to main content
A newer version of this page is available.

DxTextEditorBase.BindValueMode Property

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

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v20.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(BindValueMode.OnLostFocus)]
[Parameter]
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 Text property to a field. When the text box is rendered, the editor’s input value comes from the bound field.

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

Text Box BindValueMode OnLostFocus

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

<DxTextBox @bind-Text="@TextValue" BindValueMode="BindValueMode.OnInput" />

@code {
    string TextValue { get; set; } = "Test";
}

Text Box BindValueMode OnInput

Run Demo: Text Box - Bind Value On Input Change

See Also