windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-processnewvalueeventargs-8c1b0130.md
Gets or sets a value specifying whether the lookup editor must locate the newly inserted record.
Namespace : DevExpress.XtraEditors.Controls
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public bool Handled { get; set; }
Public Property Handled As Boolean
| Type | Description |
|---|---|
| Boolean |
true if the editor must locate the newly inserted record; otherwise false.
|
Generally, you handle the RepositoryItemLookUpEditBase.ProcessNewValue event in order to add a new record to the data source for the text entered. If you have inserted a record and want the lookup editor to locate it, you should set the Handled property to true. The editor will locate and retrieve the record after your event handler completes.
If you leave the property set to false , the editor will not try to locate the new record.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Handled 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.
how-to-use-the-processnewvalue-event-of-a-lookup-editor-e285/CS/Form1.cs#L71
}
e.Handled = true;
}
winforms-data-lookups-combobox-mode/CS/Lookup-ComboboxMode/Form1.cs#L99
ds.Add(new Product { ProductName = newValue });
e.Handled = true;
}
how-to-use-the-processnewvalue-event-of-a-lookup-editor-e285/VB/Form1.vb#L68
e.Handled = True
End Sub
winforms-data-lookups-combobox-mode/VB/Lookup-ComboboxMode/Form1.vb#L79
ds.Add(New Product With {.ProductName = newValue})
e.Handled = True
End If
See Also
ProcessNewValueEventArgs Class