Solved

TDBCtrlGrid

Posted on 1998-11-26
4
327 Views
Last Modified: 2008-03-10
Hi all,

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

Regards, zif.
0
Comment
Question by:ZifNab
  • 2
4 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1347993
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
 
LVL 8

Author Comment

by:ZifNab
ID: 1347994
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
 
LVL 2

Accepted Solution

by:
Thaddy earned 50 total points
ID: 1347995
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
 
LVL 8

Author Comment

by:ZifNab
ID: 1347996
dummy me. Should have looked at the examples myself. Thanks.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question