LookUpEditBase.ProcessNewValue Event
Allows a new value entered into the edit box, to be added to the items source.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
#Declaration
public event ProcessNewValueEventHandler ProcessNewValue
#Event Data
The ProcessNewValue event's data class is ProcessNewValueEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Display |
Gets the text entered by an end-user within the editor’s edit box. |
Handled |
Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
Inherited from Routed |
Original |
Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
Inherited from Routed |
Postponed |
Gets or sets whether to postpone edit value validation. |
Routed |
Gets or sets the Routed |
Source |
Gets or sets a reference to the object that raised the event.
Inherited from Routed |
The event data class exposes the following methods:
Method | Description |
---|---|
Invoke |
When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation.
Inherited from Routed |
On |
When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.
Inherited from Routed |
#Remarks
If the editor cannot find an item that matches the text entered by an end-user within the edit box (ProcessNewValueEventArgs.DisplayText), the ProcessNewValue event occurs. Handle this event to manually validate a new value, and if required, add the corresponding record to a data source.
The ProcessNewValue event is raised after a new value has been validated, allowing you to add this value to the items source. By default, the validation occurs while typing within the editor’s text box (see BaseEdit.ValidateOnTextInput). As a result, the ProcessNewValue event is fired each time a user presses a keyboard key.
The ProcessNewValue event occurs if an end-user presses the Enter key (the BaseEdit.ValidateOnEnterKeyPressed property should be set to true) or moves focus to another control.
If you add a new record, set the event parameter’s Handled property to true.
Note
If you want to show a floating container allowing an end-user to specify other values for a new record, set the event parameter’s Process