Label for ActionColumn

Hi all,

i need to create a label for ActionColumn in GridView::widget , but i’m lost, need some help…

here is what i’m doing


    GridView::widget([

        'dataProvider' => $dataProvider,

        'filterModel' => $searchModel,

        'columns' => [

            'name',

            'username',

            'email:email',

            [

                'label' => 'Operaciones',

                'value' =>

                [

                    'class' => ActionColumn::className(),

                    'template' => '{view}{delete}'

                ]

            ],

        ],

    ]);

i tried a lot of things but always getting some type of exception

thx

User "header"


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

          'header'=>"Actions"

],



2 Likes

Thanks it worked for me in Yii 2