RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TField.LookupList Property

Indicates a cache of values from the LookupDataSet indexed by a set of values from the KeyFields property.

Pascal
property LookupList: TLookupList;
C++
__property TLookupList LookupList;

Inspect LookupList to find the cached value assigned to the field for a given set of values on the fields specified by KeyFields. The value of LookupList is set when the dataset is open or the RefreshLookupList method is called.

Tip: Applications can also fill LookupList programmatically to provide lookup values as long as the LookupDataSet property is not set.
The ValueOfKey method of the LookupList returns the value of the LookupResultField for a set of values on the LookupKeyFields. This allows the value of the lookup field object to be computed as follows:

Value := LookupList.ValueOfKey(DataSet.FieldValues[KeyFields]);

 

Value = LookupList->ValueOfKey(DataSet->FieldValues[KeyFields]);

Note: LookupList is only meaningful when the value of FieldKind is fklookup and the LookupCache property is true.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!