Example of using Class yii\grid\CheckboxColumn

Is there any working example to learn how to use

Class yii\grid\CheckboxColumn in gridview how to get javascript data to php

I know how to use php but not good in javascript

Any sugestions or reference to learn and solve the problem

Hi,

You can refer this code:

in column of gridview:

[

‘class’ => ‘\kartik\grid\CheckboxColumn’,

‘checkboxOptions’=>function ($model, $key, $index){

                    return [


                        'id'=>"chk_{$model->id}", 'onclick'=>"alert('yourJavascript is here')"                        


                    ];


                },

]

Good luck.