Hi guys!
I have this attribute in my view file:
[
'attribute' => 'ConvMon',
'format' => 'raw',
'label' => 'Convento',
],
I want to change background color of the raw if the content is ‘Novara’. What I have to do?
I try this but it doesn’t work:
‘contentOptions’ => function($model,$key,$index,$widget) {
if (strpos($model->ConvMon, ’ ') !== false) {
return [‘style’ => ‘background-color: pink’];
}
},
thank you very much !!!