Subject | Re: [IBO] Explanations on Combos in grids |
---|---|
Author | Boris Schlüszler |
Post date | 2002-11-04T16:58:36Z |
Hi Ryan!
In respect of your desc. I assume you have something like this:
select a, b.number, b.desc from a
join b on a.bid=b.id
...
Then you try to select a b.number from the lookup-source and wonder, why
b.desc won't show up?
The reason is, that joined query won't sync the way you expect it.
Instead of JOIN try a subselect, maybe:
select a, (select number from b where id=a.bid) as number,
(select desc from b where id=a.bid) as desc
from a
and pay attention to your sync properties: sync after edit, sync after
update.
Rgds, Boris
Ryan Nilsson-Harding schrieb:
Boris Schlueszler - TS Autovermietung
Tel.: (05865) 9881-13, Fax: (05865) 1381
http://gusborn.ts-autovermietung.de
Hier mieten Sie glückliche Autos!
In respect of your desc. I assume you have something like this:
select a, b.number, b.desc from a
join b on a.bid=b.id
...
Then you try to select a b.number from the lookup-source and wonder, why
b.desc won't show up?
The reason is, that joined query won't sync the way you expect it.
Instead of JOIN try a subselect, maybe:
select a, (select number from b where id=a.bid) as number,
(select desc from b where id=a.bid) as desc
from a
and pay attention to your sync properties: sync after edit, sync after
update.
Rgds, Boris
Ryan Nilsson-Harding schrieb:
>--
> Hi there,
>
> I have a grid displaying a joined query.
> For one of the fields (STOCK), I use a lookUpCombo in the grid for
> the user to use. (As I want to store the key, but want user to see
> description)
>
> When I add a new record and step onto another grid line, the new
> record is shown (Ie., other fields other than STOCK), but the combo
> is blank. When I close & open the dataset, all is there and visible.
>
> I have figured that doing a refresh in the OnAfterPost event
> prevents me from having to close/open the query.
>
> I would like to understand this better, so my question is why does
> it need a refresh? The other columns are fine, and displayed without
> an explicit refresh, but not the column with the combo. Once
> refreshed, all is OK.
>
> Rgds,
> -Ryan
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boris Schlueszler - TS Autovermietung
Tel.: (05865) 9881-13, Fax: (05865) 1381
http://gusborn.ts-autovermietung.de
Hier mieten Sie glückliche Autos!