TDBLookup class
TDBLookup - used as source of data by
TDBLookupListBox
or
TDBLookupComboBox, to find data from a lookup table.Declaration
TDBLookup = class(TComponent)Inheritance
- TDBLookup
- TComponent
- TPersistent
- TObject
Description
TDBLookup component is typically owned by a Lookup control like
TDBLookupListBox or
TDBLookupComboBox.
The ListSource is the TDataSource for the other Dataset
from which lookup values are retrieved.
The KeyField is the lookup key in ListSource which
corresponds to the DataField value.
The ListField is the name of the field in ListSource to
list into the Items property of the lookup control.
Use EmptyValue to specify a KeyField value
automatically added to the ControlItems property when the linked
lookup dataset contains no records. No entry is added to Controlitems when
the value in EmptyValue is an empty string (''). The value in
DisplayEmpty is used for the ListField displayed in the control.
The EmptyValue and DisplayEmpty properties were added in revision 62844, and released in LCL version 2.0.8 and higher.
Properties
ControlItems | public | Contains the items displayed for the lookup control. |
LookupCache | public | Indicates if look-up information is cached in the field data link for the control. |
KeyField | public | The name of the KeyField used in the lookup search. |
ListField | public | ListField - the name of the list field displayed for the lookup. |
ListFieldIndex | public | ListFieldIndex - the index value of the list field. |
ListSource | public | ListSource - the data source that contains the lookup list. |
NullValueKey | public | Keyboard shortcut which causes an empty value to be assigned to each of the key fields defined for the lookup control. |
ScrollListDataset | public | Indicates if the Dataset in ListSource can be scrolled when loading/locating key and display values. |
EmptyValue | public | Value stored for the lookup control when a lookup value is not available. |
DisplayEmpty | public | Value displayed in the lookup control when a lookup value is not available. |
Methods
Notification | protected | Performs the notification message received for a component in the class instance. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Initialize | public | Initialize makes links between local Fields and the appropriate fields in the remote data source, then fetches the lookup data. |
KeyFieldValue | public | Gets the value(s) for one or more key fields defined for the Field in the linked dataset. |
UpdateData | public | Signals the OnUpdateData event handler for pending changes to the linked dataset. |
GetKeyValue | public | Gets the value for the key field at the specified ordinal position in the list of values from the lookup dataset. |
GetKeyIndex | public | Gets the ordinal position in the list for the specified key value. |
Inherited
From TComponent (73)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (5)
Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
