E
E
EvgMul2015-11-21 14:50:04
Yii
EvgMul, 2015-11-21 14:50:04

Yii2 how to work with GridView?

The point is the following.
I specify the column in the following way:

[
        'label' => Html::checkbox('name'),
        'content' => function ($data) {
                return Html::checkbox('name2');
        },
],

In the columns themselves, as it should, checkboxes are displayed, and in the html header, text. Is it possible to make the header also display a checkbox?
Thanks in advance to all who respond.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igorrebega, 2015-11-21
@EvgMul

Use pre-made classes, don't make bikes.

[
        'class' => 'yii\grid\CheckboxColumn',
        // you may configure additional properties here
    ],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question