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

# TFieldDataLink

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

TFieldDataLink - forms a link between a database field and an action

## Declaration

Source position: dbctrls.pp line 47

`type TFieldDataLink = class(TDataLink)`
`protected`
`procedure ActiveChanged; override;` |  | ActiveChanged - method to process changes in the Active property
`procedure DataSetChanged; override;` |  | DataSetChanged - method to process a change in the DataSet
`procedure EditingChanged; override;` |  | EditingChanged - method for processing changes in the Editing property
`procedure LayoutChanged; override;` |  | LayoutChanged- called if layout is changed: tests validity of field then calls OnLayoutChange event handler
`procedure RecordChanged(); override;` |  | RecordChanged - triggered if the contents of the current record change; calls Reset
`procedure UpdateData; override;` |  | UpdateData - if there are any pending changes, calls OnUpdateData event handler
`procedure FocusControl(); override;` |  | FocusControl - gives this control the input focus; calls the OnFocusRequest event handler
`public`
`constructor Create;` |  | Create - calls inherited Create then initialises field information
`destructor Destroy; override;` |  |
`function Edit;` |  | Edit - if the field can be modified, performs inherited Edit and shows editing status
`procedure Modified;` |  | Modified sets the IsModified local variable to True
`procedure Reset;` |  | Reset - checks that link is active, calls the OnDataChange event handler then sets IsModified to False
`property Control: TComponent; [rw]` |  | The Control to which this datalink is attached
`property Field: TField; [r]` |  | The Field to which the datalink is attached
`property FieldName: String; [rw]` |  | FieldName - the name of the attached field, stored as a string
`property CanModify: Boolean; [r]` |  | CanModify - True if the linked field is capable of being modified
`property Editing: Boolean; [r]` |  | Editing - True if the linked field is being edited
`property OnDataChange: TNotifyEvent; [rw]` |  | OnDataChange - event handler for a change in the data
`property OnEditingChange: TNotifyEvent; [rw]` |  | OnEditingChange - event handler for a changed in the Editing property
`property OnUpdateData: TNotifyEvent; [rw]` |  | OnUpdateData - event handler for updating any pending changes in the data
`property OnActiveChange: TNotifyEvent; [rw]` |  | OnActiveChange - event handler for a change in the Active property
`property OnFocusRequest: TNotifyEvent; [rw]` |  | OnFocusRequest - event handler for a request to give focus
`property OnLayoutChange: TNotifyevent; [rw]` |  | OnLayoutChange - event handler for a change in the layout
`end;`

## Inheritance

`TFieldDataLink` |  | TFieldDataLink - forms a link between a database field and an action
`TDataLink`
?
`TObject`

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