Back to Devexpress

RepositoryItemGridLookUpEdit.AcceptEditorTextAsNewValue Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemgridlookupedit-dc4cf0c1.md

latest4.3 KB
Original Source

RepositoryItemGridLookUpEdit.AcceptEditorTextAsNewValue Property

Gets or sets whether a custom value (a value that is not present in the lookup data source) that is entered in the edit box is accepted by the editor (when the value is validated and editor loses focus). This property supports Combobox mode for the lookup editor.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean AcceptEditorTextAsNewValue { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue(DefaultBoolean.Default)>
Public Property AcceptEditorTextAsNewValue As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

A value that specifies if custom values are accepted by the editor. The DefaultBoolean.Default property value is equivalent to False.

|

Available values:

NameDescriptionReturn 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

The AcceptEditorTextAsNewValue property supports Combobox mode for the lookup editor. See the Combobox Mode - Enter New Values topic to learn more.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AcceptEditorTextAsNewValue 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.

winforms-data-lookups-combobox-mode/CS/Lookup-ComboboxMode/Form1.cs#L57

csharp
gridLookUpEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
gridLookUpEdit1.Properties.AcceptEditorTextAsNewValue = DevExpress.Utils.DefaultBoolean.True;
gridLookUpEdit1.Properties.ValueMember = "ProductName";

winforms-data-lookups-combobox-mode/VB/Lookup-ComboboxMode/Form1.vb#L37

vb
gridLookUpEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard
gridLookUpEdit1.Properties.AcceptEditorTextAsNewValue = DevExpress.Utils.DefaultBoolean.True
gridLookUpEdit1.Properties.ValueMember = "ProductName"

See Also

ProcessNewValue

ComboBox Mode - Enter New Values

RepositoryItemGridLookUpEdit Class

RepositoryItemGridLookUpEdit Members

DevExpress.XtraEditors.Repository Namespace