TDBCtrlGrid

Hi all,

 How can I change my db-components so that they can be place on an dbctrlgrid?

Regards, zif.
LVL 8
ZifNabAsked:
Who is Participating?
 
ThaddyConnect With a Mentor Commented:
in the constructor put this:
 ControlStyle := ControlStyle + [csReplicatable];
 
Besides this you need to do something on the OnDatachange
or updatedata or in the paint routine (depending on the kind of control)
because you need to check if it's the focussed control (active record) or not.
So if the datalink.dataset.field<>nil use the value, otherwise use the text, or caption.
See for a simple example the vcl sourcecode: DbCtrls:TdbText;
That one will explain most of ot

0
 
kretzschmarCommented:
hi zifnab,

what does you mean?
Just drop field-components on the first line of the grid, connect the grid with a datasource.

i think thats to easy for your question. explain more!

meikl
0
 
ZifNabAuthor Commented:
Well, I've made a data-aware component, but if I put it on the grid, I get the message:'can't place this dataware component on the grid'. Zif.
0
 
ZifNabAuthor Commented:
dummy me. Should have looked at the examples myself. Thanks.
0
All Courses

From novice to tech pro — start learning today.