Click event of CButtonColumn

394 Views Asked by At

I am new to yii framework. I have spent a lot research about my problem, and I followed the tutorial on link and it did not work, my CButtonColumn could not call js function.

Hope anyone help me.

Regards, Manohar

1

There are 1 best solutions below

0
On

The code you linked looks good. Here is the distilled version:

'columns'=>[
    'class'=>'CButtonColumn',
    'template'=>'{view}',
    'buttons'=>[
        'view'=>['click'=>'some_js_function']
    ]
]

Relevant information: CButtonColumn#buttons-detail

Do you get any js-errors perhaps? If you are using ajax, as in the link you gave, check the network-tab (in chrome developer tools or similar) and see if the page request is being made.