Skip to main content

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

DataEditorClearButtonDisplayMode Enum

Lists values that specify when the clear button is visible.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public enum DataEditorClearButtonDisplayMode

#Members

Name Description
Auto

The clear button is visible when an editor is not empty. This mode requires that the editor’s data type is nullable.

Never

The clear button is not visible.

#Remarks

The Clear button allows users to clear (set to null) an editor value. The button can be displayed when the editor is not in the read-only state. Use an editor’s ClearButtonDisplayMode property to specify the clear button’s visibility.

The following code snippet displays the clear button in the DxComboBox<TData, TValue>.

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

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

ComboBox Clear Button

Run Demo: ComboBox - Clear Button and Placeholder

See Also