RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBLookupControl.LocateKey Method

Locates the value specified by KeyValue in the lookup dataset.

Pascal
function LocateKey: Boolean; virtual;
C++
virtual __fastcall Boolean LocateKey();

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!