TcxDBDataController.FindRecordIndexByKey(Variant) Method
Finds the record which contains the specified key field values.
Declaration
function FindRecordIndexByKey(const AKeyFieldValues: Variant): Integer;
Parameters
Name | Type |
---|---|
AKeyFieldValues | Variant |
Returns
Type |
---|
Integer |
Remarks
The FindRecordIndexByKey function searches for the record with the specified key field value(s) and returns its index. The AKeyFieldValues parameter specifies a variant or an array of variant values corresponding to the key field(s) set via the KeyFieldNames property.
If the record doesn’t exist or no key field names are assigned, FindRecordIndexByKey function returns -1.
The FindRecordIndexByKey method does not force the reloading of dataset data, since it searches the data controller’s internal buffer.
See Also