Subject RE: [IBO] IB_Grid?
Author Paul Schmidt
On 18 Jan 2001, at 23:24, Kaputnik wrote:

To: <IBObjects@egroups.com>
From: "Kaputnik" <delphi@...>
Date sent: Thu, 18 Jan 2001 23:24:22 +0100
Send reply to: IBObjects@egroups.com
Subject: RE: [IBO] IB_Grid?

> If I understood what you really want, it should be pretty easy...
> (Always assuming you work with IB_Datasets i.E. IB_Query and not with
> the IBO-stuff

I actually work with Delphi-2 at the moment, so IBO isn't even
available to me.

> Set the Mastersource of the Task-query to the Datasource of the
> Phase-Query. Now go to the masterlinks and add something like
> TASK.TASK_ID=PHASE.PHASE_ID

Shouldn't that be TASK.PHASE_ID=PHASE.PHASE_ID

> and you have set up your master-detal-relationship completely.
> Now attach to the OnDblClick-event or so and simply let the new dialog
> pop up...if the masterlinks are set properly, you won't have to worry
> about the rest, as the grid will show the right data.....This is just
> like masterfields and mastersource in the TDataset-classes, only
> _much_ more flexible...
>

I don't follow completely, it's 8am and the first shot of caffeine
hasn't taken effect yet.... This would mean putting both quieries
on the data module, yech.

Hmmmm, that gives me an idea, what if I put BOTH grids on the project
form, there will always be at least one phase and one task for each project
(a couple of triggers make sure of this).

So I really have three queries on the form, a query for the project
being edited, a query for the phase, and a query for the task. The
project becomes the master for the phase, and the phase becomes the
master for the task. Phase and Task are grids on the form, once you save
the Project, the Phase and Task get filled in, with the defaults. I
can then do the editing in place. Cool.

> Hope I understood you properly and
>
> CU, Kaputnik
> (Nick Josipovic)
>
> nick@... <mailto:nick@...>
> kap@... <mailto:kap@...>
> ----------------------------------------------------------------------
> - superior Client/Server programming: www.IBObjects.com
> <http://www.ibobjects.com/> a nice Tool for Interbase:
> www.InterbaseWorkbench.com <http://www.InterbaseWorkbench.com>
>
>
> > -----Original Message-----
> > From: Paul Schmidt [mailto:paul@...]
> > Sent: Thursday, January 18, 2001 8:03 PM
> > To: IBObjects@egroups.com
> > Subject: [IBO] IB_Grid?
> >
> >
> >
> > Greetings:
> >
> > Thanks to Nick and Svein (and anyone else who sent a message I
> > haven't received yet ) for the fixes for my other problems, now I
> > havre another challenge, I have the following tables:
> >
> > CREATE TABLE PHASE (
> > PHASE_ID INTEGER,
> > PROJECT_ID INTEGER,
> > NUMBER INTEGER,
> > DESC Varchar(50));
> >
> > PHASE_ID is connected to a generator, I use the value, but do not
> > want to display it.
> >
> > CREATE TABLE TASK (
> > TASK_ID INTEGER,
> > PHASE_ID INTEGER,
> > NUMBER INTEGER,
> > DESC Varchar(50));
> >
> > There is a table called Project, on the edit dialog for project, I
> > have a Grid of PHASE records with the same PROJECT_ID, this part I
> > have, with column titles and everything. Now the problem, if I
> > have three PHASE RECORDS: 1, 2,3 and Pick 2, I want to put up a
> > dialog, that contains a grid of all of the TASK records with the
> > PHASE_ID of the PHASE record in my grid, along with the other fields
> > like NUMBER and DESCRIPTION.
> >
> > I can think of ways of doing this kind of thing, but not sure if
> > they work under IBO.
> >
> > I don't see an obvious way of doing this, I am really new to IBO,
> > and maybe this is obvious and I just didn't see it.
> >
> > Thanks,
> >
> >
> > Paul
> >
> > Paul Schmidt,
> > Tricat Technologies
> > Email: paul@...
> > Website: www.tricattechnologies.com
> >
> >
> >
>
>
>
>
>


Paul Schmidt,
Tricat Technologies
Email: paul@...
Website: www.tricattechnologies.com