DxComboBox<TData, TValue>.TextChanged Event

Fires when the text in the ComboBox edit box is changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

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.

ComboBox 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";
    }
}
NOTE

Online Demo: ComboBox - Allow Input

See Also