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

RepositoryItemTextEdit.AllowNullInput Property

Gets or sets whether end-users can reset the editor’s value to null via keyboard. The edit value is reset to Color.Empty for the ColorEdit and ColorPickEdit controls.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(DefaultBoolean.Default)]
public virtual DefaultBoolean AllowNullInput { get; set; }

Property Value

Type Default Description
DefaultBoolean **Default**

A DefaultBoolean value that specifies if end-users can set the editor’s value to a null reference.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Remarks

If the AllowNullInput property is set to DefaultBoolean.True, end-users can reset the editor’s value using the actions shown below.

Editors

Action

Result

All editors except ColorEdit and ColorPickEdit.

Press CTRL+DEL or CTRL+0.

The edit value is set to null (Nothing in Visual Basic).

ColorEdit and ColorPickEdit.

Press CTRL+DEL or CTRL+0.

The edit value is set to Color.Empty.

Editors with the built-in auto-search functionality (PopupBaseAutoSearchEdit descendants, which include ComboBoxEdit, LookUpEdit, MRUEdit, etc.)

Clear the text.

Note: Set the RepositoryItemButtonEdit.TextEditStyle setting to Standard to allow text edit operations).

The edit value is set to null (Nothing in Visual Basic).

If the AllowNullInput property is set to False, these actions are disabled.

The DefaultBoolean.Default value is treated differently for different editors, as covered in the table below:

Editors

DefaultBoolean.Default is interpreted as

DateEdit (standalone and inplace)

True

Standalone editors

False

Inplace editors embedded in grid and tree list control cells.

True

Inplace editors embedded in bars and Ribbon UI.

False

For the DateEdit control, the AllowNullInput and RepositoryItemDateEdit.ShowClear properties are synchronized. When you set the ShowClear property to true, the AllowNullInput property is set to Default, and vice versa. When you set the ShowClear property to false, the AllowNullInput property is set to False, and vice versa.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowNullInput property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also