rootbear
(Alex Xm)
1
ref to:
article
attempt to change display cell background color, no luck, I end up hack ‘value’; but why not htmlOptions?
<?php $this->widget('zii.widgets.CDetailView', array(
'data' => $model,
'attributes' => array(
'field1',
array(
'class'=>'DataColumn',
'name'=>'field2',
//'type' => 'raw',
'value' => $data->field2,
//'evaluateHtmlOptions'=>true,
'htmlOptions'=>array('style'=>'{background-color:#FFFFCC;}'),
),
~~~
outrage
(Site Sense Web)
2
Your formatting is wrong. Try removing the brackets.
Try this:
'htmlOptions'=>array('style'=>'background-color:#FFFFCC;'),
If that fails, maybe:
'htmlOptions'=>array('style'=>'background-color:#FFFFCC !important;'),
rootbear
(Alex Xm)
3
thanks, still no luck with both,
outrage
(Site Sense Web)
4
rootbear
(Alex Xm)
5
thanks a lot, i will take a look.