blazor-devexpress-dot-blazor-dot-dxtextbox-93cbd10a.md
Fires after the editor text changed.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public EventCallback<string> TextChanged { get; set; }
| Type | Description |
|---|---|
| String |
A new Text value.
|
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;
}
}
BindValueModeSpecifies when to update the Text Box editor’s text.TextChangingFires when a user is changing text in the editor. Use this event to validate/cancel user input. See Also