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

DataEditorClearButtonDisplayMode Enum

Lists values that specify when the clear button is visible.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public enum DataEditorClearButtonDisplayMode

Members

Name Description
Auto

The clear button is visible when an editor is not empty.

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 code below demonstrates how to display the clear button in the DxComboBox<TData, TValue>.

<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