Solved

TDBCtrlGrid

Posted on 1998-11-26
4
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reconfigure Delphi Install? 2 65
Delphi inherited method 6 80
Convert MS Word document to a PDF file 9 115
How to build JSON File in Delphi 6 3 71
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 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