Skip to main content

RepositoryItemLookUpEdit.GetDataSourceRowByMultipleKeyValues(Object, Object[], String[]) Method

Searches for an object that represents the row containing the specified field values.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v22.2.dll

NuGet Package: DevExpress.Win.Navigation


public virtual object GetDataSourceRowByMultipleKeyValues(
    object keyValue,
    object[] otherValues,
    string[] otherFields


Name Type Description
keyValue Object

The value of the RepositoryItemLookUpEditBase.ValueMember field for the row to be located.

otherValues Object[]

An array of objects representing values for additional fields against whose values the search is performed.

otherFields String[]

An array of strings specifying the names of the fields against whose values the search will be carried out.


Type Description

An object representing the data source record containing the specified value. null (Nothing in Visual Basic) if no record is found that matches the given search criteria.


The GetDataSourceRowByMultipleKeyValues method allows you to search for a record that contains the specified values. This method returns the first record which has its RepositoryItemLookUpEditBase.ValueMember field set to the keyValue and additional fields specified by the otherFields parameter set to the values passed as otherValues.

If the otherFields or otherValues are set to null or they do not contain elements, the search will be performed against the RepositoryItemLookUpEditBase.ValueMember field.

Note that the otherFields and otherValues parameters must be arrays of the same length. Otherwise an exception is raised.

To search for a record containing a particular key value, you can use the RepositoryItemLookUpEdit.GetDataSourceRowByKeyValue method as well.

The GetDataSourceRowByMultipleKeyValues method’s return value depends upon the type of the underlying data source. If the data source is a System.Data.DataTable or a System.Data.DataView, this method returns a System.Data.DataRowView object. If the data source is a custom list of items, the appropriate list item is returned.

See Also