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

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
jamiguelAsked:
Who is Participating?
 
rwilson032697Connect With a Mentor Commented:
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
 
bruintjeCommented:
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
 
jamiguelAuthor Commented:
<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
 
bruintjeCommented:
"And together will we build a nicer world" :O))))))))))

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.

All Courses

From novice to tech pro — start learning today.