Double Click Event On Cgridview

Hi All,

I’m new here and I will be grateful for any indices.

I get double click event working on CGridView until I sort the grid by clicking on the header.

It looks like all events were cleared for table row after sorting.

Here is my code in partial rendered view:




<?php

Yii::app()->clientScript->registerScript('row_dblclick', "

    $('table > tbody > tr').on('dblclick', function(){

            alert(selected_message_id);

    });"

);

?>




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

	'id'=>'issue-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

	'columns'=>$CgrigViewColumnsParams,

        'selectionChanged'=>'

                function(id){

                         

                         //idx=$.fn.yiiGridView.getSelection(id); // is depracated

                         idx= $("#" + id).yiiGridView("getSelection");

                         if(idx > 0 && idx !="")

                         {

                            selected_message_id=idx;

                         }

                }',

)); 

?>