checkbox gridview properties

Hi guys, I’ve a little problem with checkboxes in gredview

This is my code




          [

                'class'    => 'yii\grid\ActionColumn',

                'template' => '{check}',

                'buttons'  => [

                'check' => function ($url, $data, $column) use ($campaign_id, $list_checked) {

                        $input = '<input type="checkbox"

                             class="campaign-checkbox"

                             id="campaign_' . $data->product_id . '"

                             value="'. $campaign_id . ' ' . $data->product_id . '"

                             data-index = "'. $column .'"';

                        if (in_array($data->product_id, $list_checked))

                        {

                            $input .= 'checked';

                        }

                        $input .= '>';

                        return $input;

                    },

                ],

            ],



js for my code




$(document).ready(function() {

    $('.campaign-checkbox').on('click', function(event) {

        $.ajax ({

            url: 'check',

            type: 'POST',

            dataType: 'html',

            cache: false,

            data: { data1 : $(this).val() },

        });

        if (this.checked) {

            $(this).parent().parent().addClass('success');

        }

        else {

            $(this).parent().parent().removeClass('success');

        }

    })

});



this is work for me, but I would like to use this




            [

                'class' => 'yii\grid\CheckboxColumn',

                // you may configure additional properties here

            ],



My question is, how can I set properties (id, value, class) for CheckbocColumn ? Is there some way to do that?

Seems to me you can set the options as key-value pairs in the array returned

http://www.yiiframework.com/doc-2.0/yii-grid-checkboxcolumn.html#$checkboxOptions-detail

For more details follow the link to renderTagAttributes()