Skip to main content

DataEditorClearButtonDisplayMode Enum

Lists values that specify when the clear button is visible.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.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. 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>.

<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