e.g I want to have a link, that when i click it, it will call this inside the CGridView array of yii framework ?
$('.blah').fancybox();
how to add that in a
array(
'header'=>'Image',
'type'=>'raw',
'value'=> "",
),
You can use CLinkColumn's linkHtmlOptions instead:
array(
'class'=>'CLinkColumn',
'linkHtmlOptions'=>array('onclick'=>'$(".blah").fancybox();'),
'header'=>'Image',
'label'=>'For Static Labels',// use label for static labels
'labelExpression'=>'"Dynamic label".$row'// use labelExpression for dynamic label
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With