How to eliminate another column action in yii2?

I am new to yii2, I want to view student data, in this image I want to delete the delete and edit icon, how can I delete this icon? This is my website.

This is my source code for this index view.

    GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'columns' => [
        ['class' => 'yii\grid\SerialColumn'],
        'nis',
        'nama_siswa',
        'jenis_kelamin',
         'telp',
         [
           ...],
      ['class' => 'yii\grid\ActionColumn'],

    ],
]); ?>
0
source share
1 answer

use the templateActionColumn property as

<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'columns' => [
        ['class' => 'yii\grid\SerialColumn'],
        'nis',
        'nama_siswa',
        'jenis_kelamin',
         'telp',
         [
           ...],
      [
       'class' => 'yii\grid\ActionColumn',
       'template' => '{view}'
     ],

    ],
]); ?>
+1
source

Source: https://habr.com/ru/post/1621335/


All Articles