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.v20.1.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(DefaultBoolean.Default)]
public virtual DefaultBoolean AllowNullInput { get; set; }
<DXCategory("Behavior")>
<DefaultValue(DefaultBoolean.Default)>
Public Overridable Property AllowNullInput As DefaultBoolean

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.

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.

See Also