RE: [PEAR] Datagrid access the rows data
| From: | Mark Steudel | Date: | Fri, 31 Mar 2006 16:31:25 +0000 |
| Subject: | RE: [PEAR] Datagrid access the rows data | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23496@lists.php.net to get a copy of this message | ||
Cool thanks Ill play around with that.
-----Original Message-----
From: arnaud sellenet bodin [mailto:demental@free.fr]
Sent: Friday, March 31, 2006 2:08 AM
To: PEAR General
Subject: Re: [PEAR] Datagrid access the rows data
Actually you can't do this, but with a javascript hack you could indeed.
a formatter that returns an output similar to :
'<p
onload="parent.style.background-color='.$yourcolor.'">$yourcolor</
p>'
Well the javascript event onload might not be the right one, but you can dig
in this way.
Le 31 mars 06 à 06:52, Mark Steudel a écrit :
> I was wondering if there was a way to access the data in the row, like
> below. I have a column called color which has a color in it, e.g.
> #336699,
> and I want to make the background color of this cell the same color as
> the
> data:
>
> $dg->addColumn(new Structures_DataGrid_Column('Color', 'color',
> 'color', array( 'style' => 'background-color: '.color )));
>
> Thanks, Mark
--
PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php