[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'DbCtrls' (#lcl)

TDBLookup

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TDBLookup - used as source of data by TDBLookupListBox or TDBLookupComboBox, to find data from a lookup table

Declaration

Source position: dbctrls.pp line 128

type TDBLookup = class(TComponent)

protected

  procedure Notification(); override;

  procedure DoClearSelection;

public

  constructor Create(); override;

  

Create - constructor for TDBLookup: calls inherited Create, creates links with fields and data source, initialises ActiveChange and Editing properties

  destructor Destroy; override;

  

Destroy - destructor for TDBLookup: frees links and calls inherited Destroy

  procedure Initialize();

  

Initialize makes links between local Fields and the appropriate fields in the remote data source, then fetches the lookup data

  function ListFieldValue;

  procedure UpdateData();

  function GetKeyValue();

  function GetListValue();

  property LookupCache: Boolean; [rw]

  property KeyField: String; [rw]

  

The name of the KeyField used in the lookup search

  property ListField: String; [rw]

  

ListField - the name of the list field used in the lookup search

  property ListFieldIndex: Integer; [rw]

  

ListFieldIndex - the index value of the list field

  property ListSource: TDataSource; [rw]

  

ListSource - the data source that contains the lookup list

  property NullValueKey: TShortcut; [rw]

  property OnClearSelection: TNotifyEvent; [rw]

end;

Inheritance

TDBLookup

  

TDBLookup - used as source of data by TDBLookupListBox or TDBLookupComboBox, to find data from a lookup table

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

TObject

Description

TDBLookup component is typically owned by a Lookup control like TDBLookupListBox or TDBLookupComboBox.

The ListSource is the other dataset TDataSource from which to retrieve the lookup data

The KeyField is the lookup key in the ListSource which corresponds to the DataField value

The ListField is the name of the field in the ListSource to list into the Items property of the lookup control.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.