Vcl.DBCtrls.TDBLookupControl.LocateKey

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function LocateKey: Boolean; virtual;

C++

virtual bool __fastcall LocateKey();

Properties

Type Visibility Source Unit Parent
function protected
Vcl.DBCtrls.pas
Vcl.DBCtrls.hpp
Vcl.DBCtrls TDBLookupControl

Description

Locates the value specified by KeyValue in the lookup dataset.

LocateKey is used internally to look up key values in the lookup dataset so that the control can find the appropriate display values.

LocateKey calls the lookup dataset's Locate method, passing in the current values of KeyField and KeyValue. If the key value is found, LocateKey positions the lookup dataset on the record with the matching value and returns true. Otherwise, it returns false.

See Also