Board index » delphi » TDBCtrlGrid: accessing panels

TDBCtrlGrid: accessing panels

L.S.,

I like to Access the panels of the TDBCtrlGrid at runtime, that is I like to
access to DBcontrols created on the individual panels (enabling/disabling).
I tried using the OnPaintPanel event and the index parameter but that does
not work consistantly; depending on where you click (panels or controls),
enabling/disabling occurs.. Also, the scrollbar interferes (I would like to
disable that one..)

Anybody with a solution (or know of a decendant with new  properties)?

Gr, Martin

 

Re:TDBCtrlGrid: accessing panels


Hello Martin,

There is only one panel, not many, and only one set of controls on it. The
grid iterates through records and repaints the panel and controls for every
record in a new position.

If I remember correctly, enabling or disabling a control during repainting
causes repainting of all records, thus to do it on per-record basis is very
hard.

--
Andrei Fomine.
Add full-blown clipboard and drag-and-drop capabilities to any control with
Transfer@once.
DbAltGrid allows multi-line layout and RTF text in a DBGrid descendant.
http://www.quasidata.com/

Quote
"Martin Neidig" <m...@xs4all.nl> wrote in message news:3b975479_2@dnews...
> L.S.,

> I like to Access the panels of the TDBCtrlGrid at runtime, that is I like
to
> access to DBcontrols created on the individual panels

(enabling/disabling).
Quote
> I tried using the OnPaintPanel event and the index parameter but that does
> not work consistantly; depending on where you click (panels or controls),
> enabling/disabling occurs.. Also, the scrollbar interferes (I would like
to
> disable that one..)

> Anybody with a solution (or know of a decendant with new  properties)?

> Gr, Martin

Re:TDBCtrlGrid: accessing panels


Thanks Andrei, that explains a lot..

What I want to accompish looks very simple: on a frame I want to display and
edit two records from the same set of data. Normally you use two TDatasets
to access records of the same table, but I use a memory dataset (created
with TADODataset) - so one dataset only! TCtrlGrid looked very promising..

Maybe there is another, more obvious way..

Gr, Martin

"Quasidata" <quasidata AT quasidata DOT com> wrote in message
news:3b976031_1@dnews...

Quote
> Hello Martin,

> There is only one panel, not many, and only one set of controls on it. The
> grid iterates through records and repaints the panel and controls for
every
> record in a new position.

> If I remember correctly, enabling or disabling a control during repainting
> causes repainting of all records, thus to do it on per-record basis is
very
> hard.

> --
> Andrei Fomine.
> Add full-blown clipboard and drag-and-drop capabilities to any control
with
> Transfer@once.
> DbAltGrid allows multi-line layout and RTF text in a DBGrid descendant.
> http://www.quasidata.com/

> "Martin Neidig" <m...@xs4all.nl> wrote in message news:3b975479_2@dnews...
> > L.S.,

> > I like to Access the panels of the TDBCtrlGrid at runtime, that is I
like
> to
> > access to DBcontrols created on the individual panels
> (enabling/disabling).
> > I tried using the OnPaintPanel event and the index parameter but that
does
> > not work consistantly; depending on where you click (panels or
controls),
> > enabling/disabling occurs.. Also, the scrollbar interferes (I would like
> to
> > disable that one..)

> > Anybody with a solution (or know of a decendant with new  properties)?

> > Gr, Martin

Re:TDBCtrlGrid: accessing panels


Hello Martin,

I think with two grids linked to the same dataset you will experience a
navigating issue. A dataset maintains only one set of buffers for a range of
continuous records. When you scroll records in one grid then records in
other grid will be scrolled synchronously.

--
Andrei Fomine.
Add full-blown clipboard and drag-and-drop capabilities to any control with
Transfer@once.
DbAltGrid allows multi-line layout and RTF text in a DBGrid descendant.
http://www.quasidata.com/

Quote
"Martin Neidig" <m...@xs4all.nl> wrote in message news:3b9776d5_1@dnews...
> Thanks Andrei, that explains a lot..

> What I want to accompish looks very simple: on a frame I want to display
and
> edit two records from the same set of data. Normally you use two TDatasets
> to access records of the same table, but I use a memory dataset (created
> with TADODataset) - so one dataset only! TCtrlGrid looked very promising..

> Maybe there is another, more obvious way..

> Gr, Martin

> "Quasidata" <quasidata AT quasidata DOT com> wrote in message
> news:3b976031_1@dnews...
> > Hello Martin,

> > There is only one panel, not many, and only one set of controls on it.
The
> > grid iterates through records and repaints the panel and controls for
> every
> > record in a new position.

> > If I remember correctly, enabling or disabling a control during
repainting
> > causes repainting of all records, thus to do it on per-record basis is
> very
> > hard.

> > --
> > Andrei Fomine.
> > Add full-blown clipboard and drag-and-drop capabilities to any control
> with
> > Transfer@once.
> > DbAltGrid allows multi-line layout and RTF text in a DBGrid descendant.
> > http://www.quasidata.com/

> > "Martin Neidig" <m...@xs4all.nl> wrote in message

news:3b975479_2@dnews...

- Show quoted text -

Quote
> > > L.S.,

> > > I like to Access the panels of the TDBCtrlGrid at runtime, that is I
> like
> > to
> > > access to DBcontrols created on the individual panels
> > (enabling/disabling).
> > > I tried using the OnPaintPanel event and the index parameter but that
> does
> > > not work consistantly; depending on where you click (panels or
> controls),
> > > enabling/disabling occurs.. Also, the scrollbar interferes (I would
like
> > to
> > > disable that one..)

> > > Anybody with a solution (or know of a decendant with new  properties)?

> > > Gr, Martin

Other Threads