Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RepositoryItemSearchLookUpEdit.GetIndexByKeyValue(Object) Method

Returns the index of the row that contains the specified value in the ValueMember field.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

#Declaration

public override int GetIndexByKeyValue(
    object keyValue
)

#Parameters

Name Type Description
keyValue Object

The value of the ValueMember field for the row to locate.

#Returns

Type Description
Int32

An integer that specifies the index of the required row.

#Remarks

This method searches for the row that contains the specified key value (value of the RepositoryItemLookUpEditBase.ValueMember field) and returns the index of the first row found.

Note

In Server Mode, the GetIndexByKeyValue method returns the GridControl.InvalidRowHandle value if the requested row has not been loaded.

See Also