lundi 26 septembre 2016

add a button to grid view in yii2

i'm a new yii2 developer ! i made a GridView and the code is shown below :

<?php Pjax::begin(); ?>    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\ActionColumn'],
            ['class' => 'yii\grid\CheckboxColumn'],
            ['class' => 'yii\grid\SerialColumn'],
            'id',
            'countryCode',
            'countryName',
            'currencyCode',
        ],
    ]); ?>
    <?php Pjax::end(); ?>

a screenshot of output : OUTPUT

now i want to have a column contain some button and that button for example open a page or somthing else ! my problem is how can i create that column ?




Aucun commentaire:

Enregistrer un commentaire