TMasterDataLink¶
Datalink for Master-Detail relationships between datasets.
Declaration¶
Source position: db.pas line 2081
type
TMasterDataLink = class(TDetailDataLink)
public
constructor Create;
destructor Destroy;
property FieldNames: string; {rw}
property Fields: TList; {r}
property OnMasterChange: TNotifyEvent; {rw}
property OnMasterDisable: TNotifyEvent; {rw}
end;
Inheritance¶
Description¶
TMasterDataLink is a TDatalink descendent which handles master-detail relations. It can be used in TDataset descendents that must have master-detail functionality: the detail dataset creates an instance of TMasterDataLink to point to the master dataset, which is subsequently available through the TDataLink.Dataset property.
The class also provides functionality for keeping a list of fields that make up the master-detail functionality, in the TMasterDatalink.FieldNames and TMasterDataLink.Fields properties.
This class should never be used in application code.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| FieldNames | public | List of fieldnames that make up the master-detail relationship. |
| Fields read only | public | List of fields as specified in FieldNames. |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Create | public | Create a new instance of TMasterDataLink. |
| Destroy | public | Free the datalink instance from memory. |
Events¶
| Member | Visibility | Description |
|---|---|---|
| OnMasterChange | public | Called whenever the master dataset data changes. |
| OnMasterDisable | public | Called whenever the master dataset is disabled. |
See also¶
| Name | Description |
|---|---|
| TDataset | Base class for records-based data-access. |
| TDatalink.DataSource | Datasource this datalink is connected to. |
| TDatalink.DataSet | Dataset this datalink is connected to. |
| TMasterDatalink.FieldNames | List of fieldnames that make up the master-detail relationship. |
| TMasterDataLink.Fields | List of fields as specified in FieldNames. |