LookUpEditBase.GetIndexByKeyValue(Object) Method
In This Article
Returns the specified item’s index.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
key |
Object | An object that represents the item’s key value. |
#Returns
Type | Description |
---|---|
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