Skip to main content

RepositoryItemTextEdit.AllowNullInput Property

Gets or sets whether end users can reset the editor’s value to null with the keyboard.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
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 Return Value
True

The value is true.

0

False

The value is false.

1

Default

The value is specified by a global option or a higher-level object.

2

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.

Press Ctrl+Delete or Ctrl+0.

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

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).

LookUp Editors

LookUpEdit, GridLookUpEdit, TreeListLookUpEdit, SearchLookUpEdit

Press Delete, Backspace, or Ctrl+Delete.

The TextEditStyle property should be set to DisableTextEditor or HideTextEditor.

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.

Note

The EditValue property of the WinForms ColorEdit and ColorPickEdit controls is set to null (Nothing in Visual Basic) if the AllowNullInput option is enabled and a user presses Ctrl+Del or Ctrl+0.

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