Board index » delphi » Apollo question

Apollo question

Hi.

I'm using Apollo and have a question.

I have a DBGrid which will contain order transactions. Above the grid I have a
DBLookupCombo. The grid (obviously) takes its data from a particular table
(datasource). The combo also takes its data from one of the fields in the same
table.

I'd like to filter the grid by selecting one of the items in the DBLookupCombo.
Thus far I'm having some problems.

When an item is selected from the combo, I use Apollo's Query() method to
filter the grid. This works. However, that same filter is then applied to the
DBLookupCombo's contents. Thus the Query may return one record, which
is fine, but now the combo is comprised of only one item, that same record.

I'd like to filter the grid but have the combo's contents remain intact, so I
can make further queries.

Has anyone done this or does anyone have ideas regarding same?

Unfortunately, duplicating tables is not an option.

Thanks. :)

- Mike

 

Re:Apollo question


Quote
Mike wrote:

> Hi.

> I'm using Apollo and have a question.

> I have a DBGrid which will contain order transactions. Above the grid I have a
> DBLookupCombo. The grid (obviously) takes its data from a particular table
> (datasource). The combo also takes its data from one of the fields in the same
> table.

> I'd like to filter the grid by selecting one of the items in the DBLookupCombo.
> Thus far I'm having some problems.

> When an item is selected from the combo, I use Apollo's Query() method to
> filter the grid. This works. However, that same filter is then applied to the
> DBLookupCombo's contents. Thus the Query may return one record, which
> is fine, but now the combo is comprised of only one item, that same record.

> I'd like to filter the grid but have the combo's contents remain intact, so I
> can make further queries.

> Has anyone done this or does anyone have ideas regarding same?

> Unfortunately, duplicating tables is not an option.

> Thanks. :)

> - Mike

Did you consider adding a second TTable (you do not need a second
physical table on disk).  Use one of the TTables for the combo box, and
the other for the grid.  I think that this is the easiest way to do
this...

Hope-this-helps!
Dominic

Other Threads