Apply ajax on cgridview column value using fancybox

<?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'  =&gt; 'organization_name',


        'header' =&gt; 'Organization Name',


        'type'  =&gt; 'raw',


        'value' =&gt;'(&#036;data-&gt;total_outlets&gt;0) ? CHtml::ajaxLink(


                                          &#036;data-&gt;organization_name,


                                          &quot;&quot;,


                                          array( // ajaxOptions


                                                &quot;type&quot; =&gt; &quot;POST&quot;,


                                                &quot;url&quot; =&gt; &quot;js:&#036;(this).attr(&#092;'href&#092;')&quot;,


                                             &quot;success&quot; =&gt;&quot;function(data){


                                                                                                                  


                                                                            }&quot;,


                                             ),                               


                                    


                                            


                                            array( //htmlOptions


                                           


                                            &quot;title&quot; =&gt; &quot;Instant Product View&quot;,


                                            &quot;rel&quot; =&gt; &quot;fancybox&quot;,


                                            &quot;class&quot; =&gt; &quot;grid_action_set1 check&quot;,


                                            &quot;href&quot;  =&gt;  Yii::app()-&gt;controller-&gt;createUrl(&quot;dealership/detail&quot;,array(&quot;id&quot;=&gt;&#036;data-&gt;id)),


                                            


                                            )


                                            


                                    ) : &#036;data-&gt;organization_name ' ,








    ),