DxTextEditorBase.ClearButtonDisplayMode Property

Specifies whether the text editor displays the Clear button when it is not empty.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v21.1.dll


public DataEditorClearButtonDisplayMode ClearButtonDisplayMode { get; set; }

Property Value

Type Description

A DataEditorClearButtonDisplayMode enumeration value.

Available values:

Name Description

The Clear button is displayed when an editor is not empty and is not in the read-only state. This mode requires that the editor’s data type is nullable.


The Clear button is not displayed.


The Clear button clears the editor’s value (sets it to NULL). To display this button in the editor when there is a value in it, set the ClearButtonDisplayMode property to DataEditorClearButtonDisplayMode.Auto. This mode also requires that the editor’s data type is nullable.

<DxTextBox @bind-Text="@TextValue" 

@code {
    string TextValue { get; set; } = "Some text";

TextBox Clear Button

Run Demo: Text Box - Clear Button and Placeholder

See Also