Sign in Join
FPDoc Onlineexperiment

TFieldDataLink class

In unit DBCtrls

Maintains an association between a control, an action, and a field in a linked dataset.

Declaration

pascal
TFieldDataLink = class(TDataLink)

Inheritance

  1. TFieldDataLink
  2. TDataLink
  3. TPersistent
  4. 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

Properties

ControlpublicThe Control to which this datalink is attached.
FieldpublicThe Field to which the datalink is attached.
FieldNamepublicFieldName - the name of the attached field, stored as a string.
CanModifypublicTrue if the linked field is capable of being modified.
EditingpublicTrue if the linked field is being edited.
EditingSourcepublicIndicates if the data link is changing its source properties.

Methods

ActiveChangedprotectedActiveChanged - method to process changes in the Active property.
EditingChangedprotectedEditingChanged - method for processing changes in the Editing property.
LayoutChangedprotectedLayoutChanged- called if layout is changed: tests validity of field then calls OnLayoutChange event handler.
RecordChangedprotectedRecordChanged - triggered if the contents of the current record change; calls Reset.
UpdateDataprotectedSignals the OnUpdateData event handler for pending changes to the linked dataset.
FocusControlprotectedFocusControl gives the input focus to the data-aware control in the class instance.
CreatepublicConstructor for the class instance.
EditpublicEdit - if the field can be modified, performs inherited Edit and shows editing status.
ModifiedpublicUpdates the class when the linked dataset enters an edit state.
ResetpublicChecks whether the link is active, calls the OnDataChange event handler then sets IsModified to False.

Events

OnDataChangepublicEvent handler signalled when the field data link has been changed.
OnEditingChangepublicOnEditingChange - event handler for a changed in the Editing property.
OnUpdateDatapublicOnUpdateData - event handler for updating any pending changes in the data.
OnActiveChangepublicOnActiveChange - 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.