Skip to main content

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

Gets a value of the RepositoryItemLookUpEditBase.DisplayMember field by multiple key values.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public virtual object GetDisplayValueByMultipleKeyValues(
    object keyValue,
    object[] otherValues,
    string[] otherFields
)

Parameters

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 names of additional fields against whose values the search is carried out.

Returns

Type Description
Object

The value of the RepositoryItemLookUpEditBase.DisplayMember field for the row located. null if no record with the specified value was found.

Remarks

Lookup editors store and display field values specified by the RepositoryItemLookUpEditBase.ValueMember and RepositoryItemLookUpEditBase.DisplayMember properties. You can obtain display values by corresponding key values via the RepositoryItemLookUpEdit.GetDisplayValueByKeyValue method call. However, the key field specified by the RepositoryItemLookUpEditBase.ValueMember property doesn’t necessarily contain unique values. In such a case, the RepositoryItemLookUpEdit.GetDisplayValueByKeyValue method returns a display value corresponding to the first occurrence of the specified key value.

The GetDisplayValueByMultipleKeyValues method allows you to assign additional search criteria if the key field is not unique. You must specify the array of fields and their values in addition to the key value. These arrays are set via the otherFields and otherValues parameters. If these parameters are not assigned, the GetDisplayValueByMultipleKeyValues method works like the RepositoryItemLookUpEdit.GetDisplayValueByKeyValue method.

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

See Also