Click Event Not Working In Cgridview

Hello All,

Please help me to sort out the issue which i am facing.

I am using cGridView and want to apply ajax to change the status of each record(active/inactive)

In action button I want to give ajax link to update the status(0 OR 1)

Problem : Click event is not showing in HTML view of <a> tag.

Here is my code :

<?php $this->widget(‘zii.widgets.grid.CGridView’, array(







        'selectableRows' =&gt; '50',   







	array(       // display 'status' using an expression





    array(    // display a column with &quot;view&quot;, &quot;update&quot; and &quot;delete&quot; buttons


		'template'=&gt;'{edit} {status}',


		'buttons' =&gt;array


			'edit' =&gt; array




				'url'=&gt;'Yii::app()-&gt;createUrl(&quot;product/prodcatedit&quot;, array(&quot;id&quot;=&gt;&#036;data-&gt;id))',



			'status' =&gt; array



			 'imageUrl'=&gt;Yii::app()-&gt;request-&gt;baseUrl.'/images/edit.png', // make sure you have an image



                                &#036;.fn.yiiGridView.update('mygrid', {



                                    success:function(data) {

                                          &#036;('#AjFlash').html(data).fadeIn().animate({opacity: 1.0}, 3000).fadeOut('slow');




                                return false;


			 'url'=&gt;'Yii::app()-&gt;createUrl(&quot;product/categorystatus&quot;, array(&quot;id&quot;=&gt;&#036;data-&gt;id))',










)); ?>

AND in view there is no click event :

<a class="status" href="/backend/product/categorystatus?id=1" title="status">

<img alt="status" src="/images/edit.png">


Please let me know in case of anything i am doing wrong.



Please refer this URL

and check are you doing in correct way. also please use code block to put your code. So, easily it can understand. ;)

And also please check the function again which you have bind on click event. Is control is going into this or not.


please see this link

it may be helpful