Board index » delphi » TDBComboLookUp in TDBGrid

TDBComboLookUp in TDBGrid

Sorry for all....

I've just found the dgEdit of the Option TDBGrid porperty....
It was only that !


Re:TDBComboLookUp in TDBGrid

Ralf Matthes wrote:
> Hi,

> the TTable and TQuery-Components have a Field-Editor.
> Double-Click or Right-Click/Field-Editor on your
> TTable/Tquery-Component
> and You get the Field-Editor.
> The Field-Editor has a Context-Menu to add all or selected
> Fields from the correspondending Database-Table into your TTable.
> Select any Field in this Field-Editor and the properties of this Field
> will be
> displayed in the objectinspector.

 I have been discovering that.

> In the Context-Menu you also can create new Fields:
> - Lookup-Fields (to Display for instance the Text-Field of an
> foreign-Key-Field)
> See Help for the Properties TField.Lookup, TField.LookupDataSet,
> TField.LookupKeyFields,
> TField.LookupResultField" for further Details.

That's the problem. I own Delphi 2.0 "developper" and I 've not found
anywhere the documentation about thoses
properties !!! (Online Help, Books provided with Delphi, etc...)

> - Calculated Fields (set the Value trough the "onCalcFields"-Event of
> TTable/TQuery)
> See Help for the Property TField.Calculated for further Details.

That I know... And it's documented !

> Insert this Lookup-Field as a column in your DBGrid and in Edit-Mode
> of
> this Field your get the DBLookupComboBox.

That's what I've done.
It doesn't run.... But I think you tell me the answer : You've said
Edit-Mode ! It's my second problem :
I have two joined TQuery. (Datasource property of second Query is the
TDataSource of the first Query).
The first is for dates and the second for all the other fields. The grid
use the Query2 DataSource.
Since, I haven't succed to switch the Grid to Edit-Mode...
Have you an idee to solve that ?

Thanks for all !

Fran?ois Delaby.

Other Threads