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.v22.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. |
|
False | The value is false. |
|
Default | The value is specified by a global option or a higher-level object. |
|
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 | The edit value is set to null (Nothing in Visual Basic). |
ColorEdit and ColorPickEdit. | Press | 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). |
LookUp Editors LookUpEdit, GridLookUpEdit, TreeListLookUpEdit, SearchLookUpEdit | Press The TextEditStyle property should be set to | 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.