Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

TDBCtrlGrid

Posted on 1998-11-26
4
Medium Priority
?
349 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 200 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

810 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