TFieldDataLink class
Maintains an association between a control, an action, and a field in a linked dataset.
Declaration
TFieldDataLink = class(TDataLink)Inheritance
- TFieldDataLink
- TDataLink
- TPersistent
- TObject
Description
TFieldDataLink is a
TDataLink descendant which
maintains an association between a control, an action, and a field in a
linked dataset. TFieldDataLink extends the ancestor class to provide
additional properties, methods, and events useful when working with a
data-aware control linked to a field in a dataset.
The following key properties are added in the class:
- Control
- FieldName
- Field
The following events are added in the class:
- OnDataChange
- OnUpdateData
- OnEditingDone
- OnActiveChange
TFieldDataLink is used in the implementation of several data-aware controls. In most cases, it is used in an internal member and not exposed in the interface for the control. It can, however, be used as a public or published property.
See also
- TDBLookup
- TDBEdit
- TDBText
- TDBRadioGroup
- TDBCheckBox
- TDBMemo
- TDBGroupBox
- TDBImage
- TDBCalendar
- TCustomDBComboBox
- TDataLink
Properties
Control | public | The Control to which this datalink is attached. |
Field | public | The Field to which the datalink is attached. |
FieldName | public | FieldName - the name of the attached field, stored as a string. |
CanModify | public | True if the linked field is capable of being modified. |
Editing | public | True if the linked field is being edited. |
EditingSource | public | Indicates if the data link is changing its source properties. |
Methods
ActiveChanged | protected | ActiveChanged - method to process changes in the Active property. |
EditingChanged | protected | EditingChanged - method for processing changes in the Editing property. |
LayoutChanged | protected | LayoutChanged- called if layout is changed: tests validity of field then calls OnLayoutChange event handler. |
RecordChanged | protected | RecordChanged - triggered if the contents of the current record change; calls Reset. |
UpdateData | protected | Signals the OnUpdateData event handler for pending changes to the linked dataset. |
FocusControl | protected | FocusControl gives the input focus to the data-aware control in the class instance. |
Create | public | Constructor for the class instance. |
Edit | public | Edit - if the field can be modified, performs inherited Edit and shows editing status. |
Modified | public | Updates the class when the linked dataset enters an edit state. |
Reset | public | Checks whether the link is active, calls the OnDataChange event handler then sets IsModified to False. |
Events
OnDataChange | public | Event handler signalled when the field data link has been changed. |
OnEditingChange | public | OnEditingChange - event handler for a changed in the Editing property. |
OnUpdateData | public | OnUpdateData - event handler for updating any pending changes in the data. |
OnActiveChange | public | OnActiveChange - event handler for a change in the Active property. |
Inherited
From TDataLink (28)
Active ActiveRecord BOF BufferCount CheckBrowseMode DataEvent DataSet DataSetChanged DataSetScrolled DataSource DataSourceFixed Destroy Eof ExecuteAction FirstRecord GetActiveRecord GetBOF GetBufferCount GetEOF GetRecordCount MoveBy ReadOnly RecordCount SetActiveRecord SetBufferCount UpdateAction UpdateRecord VisualControl
From TPersistent (8)
Assign AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers GetNamePath GetOwner
From TObject (40)
AfterConstruction BeforeDestruction 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 SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
