Skip to main content

DxComboBox<TData, TValue>.AllowUserInput Property

Specifies whether users can enter custom values in the edit box of the ComboBox.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public bool AllowUserInput { get; set; }

Property Value

Type Default Description
Boolean false

true to allow users to enter new values in the edit box; false to allow users only to select ComboBox values from the drop-down window.


Set this property to true to allow users to type custom values into the edit box of the ComboBox. The ComboBox editor does not add these values to the bound data source or a drop-down window. If a user enters a value equal to a drop-down window item, the editor selects the corresponding item.

To specify the text displayed in the edit box of the ComboBox, use the Text property. The example below displays the current text and value of the ComboBox editor above the editor:

ComboBox Text Changed

<p class="mb-1">
    Selected item: <b>@(Value == null ? "null" : Value)</b>, Text = <b>@Text</b>

<DxComboBox Data="@Cities"
            @bind-Text="@Text" />

@code {
    IEnumerable<string> Cities = new List<string>() { "London", "Berlin", "Paris", };
    string Value { get; set; } 
    string Text { get; set; } = "London";

Run Demo: ComboBox - Allow User Input


If you use the EditBoxTemplate property and need to allow user input, you should add a DxInputBox object to the template markup.

See Also