Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxDropDownListEditorBase<TData, TValue>.NullText Property

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

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(null)]
[Parameter]
public string NullText { get; set; }

#Property Value

Type Default Description
String null

A string value that specifies the prompt text.

#Remarks

Use the NullText property to display the prompt text in ComboBox or TagBox when there are no selected value/values.

You can also set the ClearButtonDisplayMode property to Auto to show the Clear button when ComboBox or TagBox is not empty. Users can click this button to clear the editor’s value/values.

#ComboBox Example

Razor
<DxComboBox Data="@Cities" 
            @bind-Value="@Value"
            NullText="Select cities..."
            ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"/>

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

    string Value { get; set; }
}

Run Demo: ComboBox - Clear Button and Placeholder

#TagBox Example

<DxTagBox NullText="Select countries..."
          Data="@CountryData.Countries"
          @bind-Values="@SelectedCountries"
          TextFieldName="@nameof(Country.CountryName)"
          ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto" />
</DxTagBox>

@code {
    IEnumerable<Country> SelectedCountries { get; set; }
}

Run Demo: TagBox - Clear Button and Placeholder

#Implements

DevExpress.Blazor.IDropDownListEditorBase<TData, TValue>.NullText
See Also