DxTextEditorBase.TextChanged Event

Fires when a text editor loses focus after its text has been changed.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public EventCallback<string> TextChanged { get; set; }

Parameters

Type Description
String

A delegate method that accepts the editor’s text as a parameter.

Remarks

Use the TextChanged event to handle a text change. The code below enables the Update Text button once a user types any text into the text editor.

<DxTextBox Text="Some text" TextChanged="@((newValue) => OnTextChanged(newValue))"></DxTextBox>
<DxButton Enabled="@IsEnabled">Update Text</DxButton>

@code {
    bool IsEnabled = true;

    void OnTextChanged(string newValue) {
        if (!string.IsNullOrEmpty(newValue)) {
            IsEnabled = false;
        } else IsEnabled = true;
    }
}
See Also