DxComboBox<TData, TValue>.TextChanged Event
Fires when the text in the ComboBox edit box is changed.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v20.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public EventCallback<string> TextChanged { get; set; }
Parameters
Type | Description |
---|---|
String | New text. |
Remarks
Use the TextChanged event to handle changes to the text.
<DxComboBox Data="@Cities"
TValue="string"
TData="string"
AllowUserInput="@true"
Text="@Text"
TextChanged="@OnTextChanged">
</DxComboBox>
<DxButton Enabled="@IsEnabled">Update Text</DxButton>
@code {
IEnumerable<string> Cities = new List<string>() {
"London",
"Berlin",
"Paris",
};
string Text { get; set; } = "New York";
bool IsEnabled = false;
void OnTextChanged(string newValue) {
Text = newValue;
IsEnabled = newValue != "New York";
}
}
See Also