Subject Re: [IBO] IB_LookupCombo
Author Shanil Misra
--- In, Helen Borrie <helebor@...> wrote:
> At 09:59 PM 7/11/2007, you wrote:
> >Hi, I've setup an IB_LookupCombo (Firebird 2 / Delphi 2006) and
> >keylinks and gridlinks all work fine. My gridlinks show two
> >from the child table and when I click on the combo, they show in
> >popup list and the dataset edits fine and changes. However, the
> >fields don't show when the IB_LookupCombo is displayed on the
form -
> >only the first field shows. How can I get them to show all the
> From what I can make of the above description, you're possibly
trying to use the IB_LookupCombo for the wrong kind of
relationship. What do you mean when you say "..don't show when the
IBL_LookupCombo is displayed on the form..." ?
> >Also, another related question, is it possible to set up
> >with two different tables with the columns in a foreign key
> >relationship?
> GridLinks is a property of the control, specifically a property of
the drop-down list part of the control, which is an IB_Grid. In the
case of this control, it enables you to have multiple fields in the
> Data controls are set-driven. The datalinking between the set and
the control is by way of the IB_Datasource. The only way you could
have fields from multiple tables would be if the set were from
multiple tables, i.e., a joined set or one with expression fields
derived from subqueries.
> >I want both fields to show in the popup, as well as the
> >display as above.
> You can't have multiple fields in the field part of the control,
if this is what you meant. That's not how lookup controls work.
The field part contains a unique key or, more usually in practice,
the descriptive text associated with a unique key.
> It's not at all clear to me what you are trying to do here....
> Helen

Hi Helen - thanks for the quick reply!

OK let me explain by an example.

I have two fields in my gridlinks: Cover.Scheme and Cover.Cover.

At Runtime, when I click on the LookupCombo, both fields appear in
the popup of the LookupCombo. However, on the form, when the popup
of the LookupCombo is closed, only the first field Cover.Scheme
appears showing on the LookupCombo field display. I would like to
see both fields showing on the LookupCombo ie. I don't want the user
to click on the control to be able to see both Scheme and Cover

With my other question, I have two fields: Bank.Name and
Bank_branch.Name linked by bank_id foreign key. When I click on the
LookupCombo, I would like to see AND display both fields. At the
moment, only the Bank.Name shows and displays in the popup.

Best regards