Remove/Disable rowOption function for single column (e.g ActionColumn) in GridView

Hello Everyone,

I have use Onselect row change to redirect view/update page with selected id, but when click on ActionColumn button (i.e Delete) in Grid View page so it redirect to view/update page.

So, how can i stop or prevent redirect to page action on Action Column button.

This is my code…


<?= GridView::widget([

        'dataProvider' => $dataProvider,

        'filterModel' => $searchModel,

    'rowOptions' => function ($model, $key, $index, $grid) {

                            return ['id' => $model['student_transaction_id'], 'onclick' => "window.location='" .\Yii::$app->urlManager->createUrl('student/student-transaction/update?id=', ['id'=>'']) . "' + this.id;"];

        },

        'columns' => [

            ['class' => 'yii\grid\SerialColumn'],

             'student_transaction_id',

             'academic_term_id',

             'academic_term_period_id',

             'course_id',

            [

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

        'template' => '{update} {delete}',      

        ],

        ],

    ]); ?>

Please Help me :unsure:

Just a hint:

Thank you… Yiim :) :D :rolleyes: