Subject Re: [IBO] Colors for IB_LookupCombo in an IB_Grid
Author staff@belding
Hello Helen

Thanks for your reply.


> Perhaps it is time to re-state your problem. I thought you were dealing
> with coloring problems (i.e. problems with the controls). Now you say you
> have linking problems also (i.e. problems with you data linkages).

Yes, several posts ago I did restate the problem, saying color properties
were not the problem but the problem was the variable Text .... etc.
>
> For a lookup you must set the KeySource property and some others
> besides; and the format of KeyLinks is **different** for this type of
> relationship. If you have the GSG (Getting Started Guide), please look
> closely at the steps for the data linkages.

Yes, I am aware of this, and have set the links as advised in the FAQ by
Lars George, which is, I think, similar to the GSG. I just reread the GSG
and think I have done all its suggests. The examples the GSG and in the Lars
George FAQ article have linked columns with the
same name.In the examples I have if the column names are different a
LookupCombo inside or outside an IB_Grid presents grid information blank.

The experiment I list below shows there is no problem if the linked fields
have the same name. If they have different names my LookupCombo, inside or
outside the IB_Grid, shows blanks when it should show the current value of
the cell in the grid.

I am missing something because the IBO Sample-Contact app works OK with
linked columns with different names.
I have compared my examples line by line with Sample - Contact app and have
found no clue as to what I am missing.

My solution is to rename columns so that source and target columns have the
same name.

Thanks

Russell Belding
>
----- Original Message -----
From: Helen Borrie <helebor@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, February 07, 2001 2:44 PM
Subject: Re: [IBO] Colors for IB_LookupCombo in an IB_Grid


> At 01:53 PM 07-02-01 +1300, you wrote:
> >Hello Svein
> >
> >I did as you suggested, set up a simple example and its IB_LookupCombo
> >inside an IB_Grid works OK. I also read Lars George FAQ note on this
topic
> >and ensured I had implemented the points of his recipe. Still my App does
> >not
> >work
> >
> >However I may have found the source of the problem as either a
> >misunderstanding on my part or a shortcoming in IBO.
> >
> >Start with table GTable supplying IB_Grid using IB_QUERY qrGTable and
> >datasource dsGTable. GTable has column COL01.
> >
> >Insert IB_LookupCombo (LC) into IB_Grid and get its data from table
LCTable,
> >column COL01A using IB_Query qrLCTable and dsLCTable.
> >
> >qrLCTable has KeyLinks as LCTABLE.COL01A=GTABLE.COL01 and KeySource as
> >dsGTable.
> >LC has DataSource as dsLCTable and DisplayField as COL01.
> >
> >Under these circumstances, when in the grid and the embedded LC is
selected,
> >the displayed field is blank. But one can correctly select a value from
the
> >drop down list and the value is accepted.
> >
> >Now rework table LCTable changing the name of the column from COL01A to
> >COL01 and adjust the Delphi code accordingly. The blank field problem
goes
> >away.
> >
> >Now rework LCTable back to its original column name. The problem returns.
> >
> >Have I missed something about linking fields with different names?
> >
> >Otherwise the qrLCTable.KeyLinks is insufficient to link columns with
> >different names.
>
>
> That is exactly correct.
>
> Helen
>
>
> All for Open and Open for All
> InterBase Developer Initiative ยท http://www.interbase2000.org
> _______________________________________________________
>
>
>