<?php
Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . ‘/js/fancybox/jquery.fancybox-1.3.1.css’);
Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl.’/js/fancybox/jquery.fancybox-1.3.1.pack.js’, CClientScript::POS_HEAD);
Yii::app()->clientScript->registerScript(‘fancyboxClick’, ‘$(“a[rel=fancybox]”).fancybox({“scrolling” : “yes”});’, CClientScript::POS_READY);
?>
// use this to apply ajax inside value tag with condition or without doesn’t matter.
In this I am applying popup box on the value of current td .
By using fancybox .
If you want to apply then you need above files to be defined which you can download from the yii home page by writing fancybox
array(
'name' => 'organization_name',
'header' => 'Organization Name',
'type' => 'raw',
'value' =>'($data->total_outlets>0) ? CHtml::ajaxLink(
$data->organization_name,
"",
array( // ajaxOptions
"type" => "POST",
"url" => "js:$(this).attr(\'href\')",
"success" =>"function(data){
}",
),
array( //htmlOptions
"title" => "Instant Product View",
"rel" => "fancybox",
"class" => "grid_action_set1 check",
"href" => Yii::app()->controller->createUrl("dealership/detail",array("id"=>$data->id)),
)
) : $data->organization_name ' ,
),