Replace view CbuttonColumn action by double clicks on

Hi everyone, I have a table that I display from postgresql database. I generated the crud of it but deleting possibilities to create, update or delete an entry. However I noticed that for every table’s row there is an extra column with the button “view” remaining. I would like to delete this column (no problem to do that) with the “view” button but keeping the possibility to display the view by double clicking on row. therefore I don’t really how to do it exactly.

Thanks by advance for your help

A little search on the forum : http://www.yiiframework.com/forum/index.php/topic/15672-reacting-on-click-anywhere-in-cgridviews-row/page__view__findpost__p__77791

Depending on your urlManager rules, this SO post could be interesting:

You can remove the button as you said…

To make the row cliable check my answer on StackOverflow…

I have given the solution to make the row as link, you can change it to double-click…

StackOverflow answer to make row clickable link

I had searched with "dbl cliks" "double clicks" and others… but found anything intersting, hence my topic.

Thanks for your reply =)

Well, I tried what you adviced me however I would have some others question… I didn’t reach what I wanted exactly…

in one of my view, in file admin.php I created my script, I chose somthing very simple first :


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

$('.info-row').dblclick(function(id){alert('hello world')});"

);

afterward, I would like to apply this double clicks script on every row of my table but here is the problem. I d’ont really know how to apply my script on my table. First I tried to use selectionChanged key but without success… job was done in one click only, then I tried many other things, but here again without success. So where and how to use my script in order to display my alert bow every double clicks on a table’s row

Here is a sample of view’s code without changes :


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

    'id'=>'myPerfgrid',

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

    'filter'=>$model,

    'columns'=>array(

        'name' => 'fisrtName',

        'UpdateTime',

        'StartTime'),));

Ok finally I found out the solution… adding a balise <div class=“info-row”> on php was enough… I did it before posting this post but… I don’t know why, I have had to miss my test…