wkempees
Posts: 1679
|
Posted: 06/19/2008, 3:05 AM |
|
No not in the mood but:
make sure you have the grids data row:
<tr class="Row"> needs to be <tr {gridname:attribname}>
gridname= the name of your grid, attribname the name of the attribute (you give it a name)
Why? Because this: <tr class="Row" style="BACKGROUND: RED"> does not work.
The background color is set by the class Row, so we need to get rid of the class and set the BACKGROUND ourselves and <tr bgcolor=> is no longer valid HTML.
Do this first:
In the Before Show Row Event:
$Component->Attributes->SetValue('rowcollored', ' style=" BACKGROUND: Red " ');
to colour all rows red, test it.
$Component->Attributes->SetValue('rowcollored', 'class="Row"');
to reset to standard CCS CSS setting, test it.
Once you have both statements tested and working, then you start thinking about the condition......
In the Before Show Row Event:
IF ( 1 == 1 ) // always true for testing
$Component->Attributes->SetValue('rowcollored', ' style=" BACKGROUND: Red " ');
ELSE
$Component->Attributes->SetValue('rowcollored', 'class="Row"');
Of course you define the condition, at which time ( 1==1 ) needs to be replaced by your condition.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|