3.0 beta 2

Want to color/shade the specific cell while exporting the csv file via PHP

I m exporting a csv via php. i need to shade specific cells on some conditions any idea how to do that?

a piece of code is here...
while(!$rsLength->EOF && $rsLength!=null)
$rsPrice = $objProduct->GetProdPrice($rsWidth->fields['width_ID'],$rsLength->fields['length_ID'],$ProdID);
$new_contents .= "---,";
<font color="red"> <?$new_contents .= "*$ ".$rsPrice->fields['price'].",";
else if($rsPrice->fields['isSplice']==0)
$new_contents .= "$ ".$rsPrice->fields['price'].",";
help needed
March 26,
I asked a similar question about 2 months or so ago.

The solution is quite simple. You can do it in JavaScript with some calls to the AW functions. E.g. -
        obj.setCellColor(function(col, row){
                return this.getCellData(4, row).match("fail") ? "red" : "black"})
        obj.getCellTemplate(4).setStyle("color", function(){
                return this.getCellProperty("color")})

In this example, I set the colour of the text in the fifth column to be either red or black depending on whether the text matches the string "fail" or not.
March 26,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.