Solved

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

Posted on 1999-01-18
4
154 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
[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 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

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 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