Cutomised Gridview

I am using a gridview which displays content of a table.

My gridview has a custom button for email i.e {add view email}

The email button is working fine but without ajax… and when i use the ajax call iam unable to find the refrence of the row i.e on which row i have clicked…

Can anyone help me finding it…

I have done similar by using this code…


Yii::app()->clientScript->registerScript(‘dc’, "

if( 1 !== $(’#quiz-grid table tbody tr’).children().length ){

&#036;('#quiz-grid table tbody tr').live('click',function()


    var id =     &#036;(this).children(':nth-child(1)').text();

    window.location = '/xxxx/yyyy/index/id/'+id;



else {