Back to Devexpress

ProcessNewValueEventArgs.Handled Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-processnewvalueeventargs-8c1b0130.md

latest3.6 KB
Original Source

ProcessNewValueEventArgs.Handled Property

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

Declaration

csharp
public bool Handled { get; set; }
vb
Public Property Handled As Boolean

Property Value

TypeDescription
Boolean

true if the editor must locate the newly inserted record; otherwise false.

|

Remarks

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

csharp
}
    e.Handled = true;
}

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

csharp
ds.Add(new Product { ProductName = newValue });
    e.Handled = true;
}

how-to-use-the-processnewvalue-event-of-a-lookup-editor-e285/VB/Form1.vb#L68

vb
e.Handled = True
End Sub

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

vb
ds.Add(New Product With {.ProductName = newValue})
    e.Handled = True
End If

See Also

DisplayValue

ProcessNewValueEventArgs Class

ProcessNewValueEventArgs Members

DevExpress.XtraEditors.Controls Namespace