TECH TIP: Display DataPipeline.MasterFieldLinks Editor in code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
uses ppForms, ppFLnkEd; procedure TForm1.DisplayFieldLInkEditor; var lFormClass : TFormClass; lFieldLinkEd: TppCustomMasterFieldLinkEditor; begin {the detail pipeline's masterdatapipeline property needs to be set prior to using the field link editor} if (myDetailPipeline.MasterDataPipeline = nil) then myDetailPipeline.MasterDataPipeline := myMasterPipeline; {get the registered field link editor class} lFormClass := ppGetFormClass(TppCustomMasterFieldLinkEditor); {create the field link editor} lFieldLinkEd := TppCustomMasterFieldLinkEditor(lFormClass.Create(Application)); lFieldLinkEd.DataPipeline := myDetailPipeline; try lFieldLinkEd.Execute; finally lFieldLinkEd.Free; end; end; |