Skip to main content
All docs
V26.1
  • DxTextBox.TextChanged Event

    Fires after the editor text changed.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v26.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Parameters

    Type Description
    String

    A new Text value.

    Remarks

    Use the TextChanged event to handle a text change. The following code snippet disables the Update Text button when a user removes the text and the Text Box loses focus:

    <DxTextBox Text="Some text" TextChanged="@((newValue) => OnTextChanged(newValue))" />
    <DxButton Enabled="@IsEnabled">Update Text</DxButton>
    
    @code {
        bool IsEnabled = false;
    
        void OnTextChanged(string newValue) {
            if (string.IsNullOrEmpty(newValue)) {
                IsEnabled = false;
            } else IsEnabled = true;
        }
    }
    
    BindValueMode
    Specifies when to update the Text Box editor’s text.
    TextChanging
    Fires when a user is changing text in the editor. Use this event to validate/cancel user input.
    See Also