Board index » delphi » Colors in cells on DBgrid ?

Colors in cells on DBgrid ?

Hi
I have this app. where I would like for each row to fill out a cell with a
specific color depending on a text value in the connected datasource.

So basically my question is: How do I use different colors in cells in the
same column in a DBGrid ?

thanks in advance

regards

Henrik T. Poulsen

 

Re:Colors in cells on DBgrid ?


Quote
Henrik T. Poulsen wrote in message

<01bdac35$33921de0$LocalH...@sif.diku.dk>...

Quote
>Hi
>I have this app. where I would like for each row to fill out a cell with a
>specific color depending on a text value in the connected datasource.

>So basically my question is: How do I use different colors in cells in the
>same column in a DBGrid ?

Try using the OnDrawColumnCell and than paining it manually (by drawing onto
cell's Canvas).

Bojan

Re:Colors in cells on DBgrid ?


Henrik T. Poulsen (henri...@diku.dk) wrote:
: I have this app. where I would like for each row to fill out a cell with a
: specific color depending on a text value in the connected datasource.

: So basically my question is: How do I use different colors in cells in the
: same column in a DBGrid ?

There was an article that covered this in the January 1998
issue of Delphi Informant.  For back issue ordering information
and free downloadable source code, go to
http://www.informant.com/delphi/
--
============================================================
Rick Carter   carte...@email.uc.edu   rcar...@tso.cin.ix.net
============================================================

Re:Colors in cells on DBgrid ?


Quote
> I have this app. where I would like for each row to fill out a cell with
a
> specific color depending on a text value in the connected datasource.

> So basically my question is: How do I use different colors in cells in
the
> same column in a DBGrid ?

This described to www.i-connect.ru/~tornado

Re:Colors in cells on DBgrid ?


Use RXTools, the DGBrid lets you do lots of stuff not so upfront
available with the normal dbGrid

Cheers
Conrad Smith

Quote
Bojan Cekrlic wrote:

> Henrik T. Poulsen wrote in message
> <01bdac35$33921de0$LocalH...@sif.diku.dk>...
> >Hi
> >I have this app. where I would like for each row to fill out a cell with a
> >specific color depending on a text value in the connected datasource.

> >So basically my question is: How do I use different colors in cells in the
> >same column in a DBGrid ?

> Try using the OnDrawColumnCell and than paining it manually (by drawing onto
> cell's Canvas).

> Bojan

Other Threads