Back to Devexpress

LookUpEditBase.GetIndexByKeyValue(Object) Method

wpf-devexpress-dot-xpf-dot-editors-dot-lookupeditbase-dot-getindexbykeyvalue-x28-system-dot-object-x29.md

latest2.1 KB
Original Source

LookUpEditBase.GetIndexByKeyValue(Object) Method

Returns the specified item’s index.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public int GetIndexByKeyValue(
    object keyValue
)
vb
Public Function GetIndexByKeyValue(
    keyValue As Object
) As Integer

Parameters

NameTypeDescription
keyValueObject

An object that represents the item’s key value.

|

Returns

TypeDescription
Int32

An integer value that specifies the item’s index.

|

Remarks

To bind the editor to a data source, use its LookUpEditBase.ItemsSource property. The LookUpEditBase.DisplayMember and LookUpEditBase.ValueMember properties specify the field names in a data source that supply display strings and item values, respectively.

To obtain the specified item’s display and key values, use the LookUpEditBase.GetDisplayValue and LookUpEditBase.GetKeyValue methods, respectively.

See Also

GetKeyValue(Int32)

LookUpEditBase Class

LookUpEditBase Members

DevExpress.Xpf.Editors Namespace