Avataris
asked on
How to Create a DB component with FIELD selector
Hi, I want to create a DB component where I select the Datasource. That works correctly, but when I want to select the FIELD (TFIELD) I get a list of ALL fields. I only want to have the fields from the source I've selected in the object inspector.
Anyone knows How?
Anyone knows How?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't have a DBREG anything :(
Please show me the exact declaration and get/set methods and the internal field declaration.
ASKER
But I think i get your point :)
I'll test it now.
I'll test it now.
I have it in <delphidir>\Source\Propert y Editors\dbreg.pas
(Delphi 5 Enterprise)
(Delphi 5 Enterprise)
ASKER
Thanx, this method :
RegisterPropertyEditor(Typ eInfo(stri ng), TComponent, 'DataField', TDataFieldProperty);
Is all I needed :)
RegisterPropertyEditor(Typ
Is all I needed :)
It's strange that you needed it.
Anyway... You don't seem to be interested in a complete solution. Good luck.
Anyway... You don't seem to be interested in a complete solution. Good luck.
ASKER
Thanx, this method :
RegisterPropertyEditor(Typ eInfo(stri ng), TComponent, 'DataField', TDataFieldProperty);
Is all I needed :)
RegisterPropertyEditor(Typ
Is all I needed :)
ASKER
I don't have Delphi 5, just Delphi 4.
Delphi 4 has no examples about the subject.
Complete solutions take the fun of programming away ;)
But my component works fine now :)
Thanks!
Delphi 4 has no examples about the subject.
Complete solutions take the fun of programming away ;)
But my component works fine now :)
Thanks!
ASKER