alternating row colors

J

john

Guest
Has anyone been able to figure out a way to get the rows to alternate color? I know if you usethe class .result{background-color:#blue} in your css file you can get one of the colors, but i don't know which class i can use for the other color. Can anyone help please.
 
E

Eugenio

Guest
john wrote:
>
> Has anyone been able to figure out a way to get the rows to
> alternate color? I know if you usethe class
> .result{background-color:#blue} in your css file you can get
> one of the colors, but i don't know which class i can use for
> the other color. Can anyone help please.

This feature is not supported at the moment.

Eugenio.

(Latest version of DaDaBIK when this message was posted: 2.2.1)
 
L

Lucindrea

Guest
i dont have the code in frount of me right now BUT .. it would seem that all you need to do is find the loop that displays the next line in the table and do a

int A;
if (A==1)
{echo "<td bgcolor='#0000ff'>";A=0;}
else
{echo "<td bgcolor='#aa00ff'>";A=1;}
 
L

Lucindrea

Guest
ok this is really ugly colors .. but it does work ( only on details page right now )

open busness_logic.php and find the line
$details_table .= "<tr><td valign=\"top\" align=\"right\"><b>".$fields_labels_ar[$i]["label_field"]."</b></td><td>".$field_to_display."</td>

( around 1630 )

comment that .. just before it put

if ($A==1)
{$color= "<td valign=\"top\" align=\"right\" bgcolor=\"#0000ff\">";$A=0;}
else
{$color= "<td valign=\"top\" align=\"right\" bgcolor=\"#aa00ff\">";$A=1;}
$details_table .= "<tr>".$color."<b>".$fields_labels_ar[$i]["label_field"]."</b></td><td>".$field_to_display."</td></tr></tr>";


it's not a 100% soultion .. but it's a good place to start.
 
Top