Sign in Join
FPDoc Onlineexperiment

TColumn.LinkField procedure

Member of TColumnprotectedIn unit DBGrids

Establishes a link between the FieldName and the Field in a Dataset.

Declaration

pascal
procedure LinkField

Description

LinkField is a procedure used to establish a link between the FieldName in the column and the Field in its Dataset. LinkField requires Grid to be assigned in order to access the DataLink and its Dataset. When Grid is unassigned, the value for Field is Nil. The DataLink in Grid must be Active to access the Fields in the dataset. When DataLink in not Active, the value in Field is Nil.

LinkField finds the Field in the linked dataset with the name specified in FieldName. The TField instance is stored in the Field property. LinkField calls the ApplyDisplayFormat method to update the DisplayFormat used for the column.

LinkField is called when reading the value for the Field property and it has not already been assigned.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.