Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how can i assign a color to an row in an Dbgrid?

Posted on 1999-01-18
4
Medium Priority
?
160 Views
Last Modified: 2010-04-04
how can i assign a color to an row in an Dbgrid?

i have a Table with these fields:

key    n  *
Name   n
adress n
Color  n
 
then i have a Form, Dbgrid Datasource, Ttable

when i capture the color in an appendrecord:

table1.appendrecord([
                     key.text,
                     name.text,
                     adress.text,
                     panel1.color
                    ])

then i have an Dbgrid with tree fields(Key, NAme and adress), but i need assign the color (of the field Color) in  the field respectively
0
Comment
Question by:jamiguel
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 0 total points
ID: 1362351
Write a handler for the grid OnDrawCell event which sets the color of the canvas for the grid to the appropriate colour.

Cheers,

Raymond.
0
 
LVL 44

Expert Comment

by:bruintje
ID: 1362352
And if you need an example of how to accomplish that I have some the original was not written by me, but I have used it in a stringgrid.

:O)
brUINTje.
0
 

Author Comment

by:jamiguel
ID: 1362353
<Rwilson>
Your answer is good, but alone it is an idea, of all ways served me

<Bruintje>
can you send me the example to jamiguel@mail.itcac.mx ?


0
 
LVL 44

Expert Comment

by:bruintje
ID: 1362354
"And together will we build a nicer world" :O))))))))))

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

876 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