Dinamic class on datagrid

Im loading a dynamic datagrid from a mysql database via php. I having no problems formating the XML and everything is working fine. <br>I have a boolean field on the database ( can only be 0 or 1) and i want to change the grid backgroung for the row depending on the value of this field. <br>I tried to add a CDATA for the row but doesnt work, then i tried to add a CDATA for the cells and it only write me the html on the cell <br>Im doing something like that



/* CODE */



$class = " “;

if($row[‘field’] == 1)

{

$class = “”;

}

$string_to_print = "

<?xml version="1.0" encoding="iso-8859-1"?>



        

            field 1”.$class."

            field 2".$class."

        

    

";



I using the tabs for clearing code, in my code the xml is just one line



Thats is not working, i get style=‘background-color:#FF0000’ writed on the cell when the cell is empty and nothing when the cell have any data

There are any way to fo what i want to do?

Thanks in advance

If you need to set style for whole row you can use attribute of the row tag.


<?xml version="1.0" encoding="iso-8859-1"?>

<row id=‘1’ “.$class.” >

value of style attribute of row tag will be applied to all cells in row. ( also there is bgColor attribute, which can be used for row color setting )

Thanks
i use the bgColor and it works fine