Back to Devexpress

LookUpEditBase.SelectItemWithNullValue Property

wpf-devexpress-dot-xpf-dot-editors-dot-lookupeditbase-9963517a.md

latest2.1 KB
Original Source

LookUpEditBase.SelectItemWithNullValue Property

Gets or sets whether the editor searches for a null item in the bound data source when the editor value is null (empty). This is a dependency property.

Namespace : DevExpress.Xpf.Editors

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

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

Property Value

TypeDescription
Boolean

true to find and select an item with null value; otherwise, false.

|

Remarks

In versions before 18.1, the LookUpEditBase searched for the null value in the source collection when its EditValue property was empty. This led to performance issues in forms with empty editors bound to large data sources.

Starting with version 18.1, the LookUpEditBase does not select any item in the source collection when the EditValue property is null (the LookUpEditBase.SelectedIndex property remains “ -1 “). If items or value properties (specified in the editor’s LookUpEditBase.ValueMember property) in your source collection can be empty and you want to select them by assigning null to the EditValue property, set the SelectItemWithNullValue property to true.

See Also

LookUpEditBase Class

LookUpEditBase Members

DevExpress.Xpf.Editors Namespace