Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxMaskedInput<T>.TextChanged Event

Fires when a text editor’s content is changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

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

#Parameters

Type Description
String

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

#Remarks

The TextChanged event does not re-render the component. This event’s behavior depends on the BindValueMode property value:

Value Description
OnLostFocus TextChanged acts as a standard HTML change event.
OnInput TextChanged acts as a standard HTML input event.

Use the TextChanged event to handle a text change.

Razor
<DxMaskedInput @bind-Value="@Value" 
               Mask="(999) 000-00-00" 
               TextChanged=@OnTextChanged>
</DxMaskedInput>

@code {
    string Value { get; set; }

    void OnTextChanged(string newValue) {
        @* Your code *@
    }
}
See Also