TurboDB VCL Component Library


TTdbDataSet        See also

Previous  Top  Next

Occurs when a link field has been changed to a value that cannot been resolved.

Delphi syntax:

TResolveLinkEvent = procedure(Sender: TObject; FieldNo: Integer; const LinkInfo: string; var RecordId: Integer; var Cancel: Boolean);

property OnResolveLink: TResolveLinkEvent;

C++ syntax:

typedef void __fastcall (__closure *TResolveLinkEvent)(System::TObject* Sender, int FieldNo, const AnsiString LinkInfo, int &RecordId, bool &Cancel);

__property TResolveLinkEvent OnResolveLink = {read=FOnResolveLink, write=FOnResolveLink};


Write an OnResolveLink event handler to provide a custom procedure to find the record of the master table to link to. The handler is expected to set RecordId to the record id of the record in the master table that should be linked to the active record in the detail table. It can also set Cancel to True to prevent any linking from taking place.