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

RepositoryItemTextEdit.AllowNullInput Property

Gets or sets whether pressing the CTRL+DEL and CTRL+0 key combinations resets the editor’s value to null (Color.Empty for the ColorEdit and ColorPickEdit controls).

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v18.2.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 use the CTRL+DEL or CTRL+0 key combinations to reset the editor’s value to:

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

The DefaultBoolean.Default value is treated differently for different editors, and when editors are used in-place or as standalone controls:

  • for the DateEdit control, the DefaultBoolean.Default value is treated as True, regardless of whether the control is used in-place or as standalone;
  • for other editors, the DefaultBoolean.Default value is treated as True if the editors are used in-place in container controls (XtraGrid, XtraVerticalGrid and XtraTreelist); and it’s treated as False for standalone versions of the editors, and when the editors are used in-place within bars.

For a date editor, the AllowNullInput and RepositoryItemDateEdit.ShowClear properties are synchronized. Setting the ShowClear property to true sets the AllowNullInput property to Default automatically, and vice versa. Setting the ShowClear property to false sets the AllowNullInput property 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