Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 371
  • Last Modified:

TDBCtrlGrid

Hi all,

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

Regards, zif.
0
ZifNab
Asked:
ZifNab
  • 2
1 Solution
 
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
 
ThaddyCommented:
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
 
ZifNabAuthor Commented:
dummy me. Should have looked at the examples myself. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now