Skip to main content
A newer version of this page is available.

DxComboBox<TData, TValue>.NullText Property

Specifies the ComboBox’s prompt text when the editor’s value is null.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public string NullText { get; set; }

Property Value

Type Description
String

A string value that specifies the prompt text.

Remarks

Use the NullText property to display the prompt text in the editor when its value is null.

You can also set the ClearButtonDisplayMode property to Auto to show the Clear button when the editor has a non-null value. Users can click this button to clear the editor’s value (set it to null).

<DxComboBox NullText="Select a country..."
            Data="@CountryData.Countries"
            @bind-Value="@CurrentCountry"
            TextFieldName="@nameof(Country.CountryName)"
            ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto">
</DxComboBox>

@code {
    Country CurrentCountry { get; set; } = CountryData.Countries[1];
}

ComboBox NullValue

Run Demo: ComboBox - Clear Button and Placeholder

See Also