DxTextBox.TextChanged Event
Fires when a Text value changes.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.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;
}
}
You can also use the BindValueMode property to specify how and when to update the Text Box editor’s text.
See Also