Skip to main content
All docs
V25.1
  • 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.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [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

    <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; }
    }
    

    ComboBox - Clear Button

    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; }
    }
    

    TagBox Clear Button

    Run Demo: TagBox - Clear Button and Placeholder

    Implements

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