Answer the question
In order to leave comments, you need to log in
Link in GridView column?
There is this code:
echo GridView::widget([
'dataProvider' => $dataProvider,
'showHeader' => false,
'summary' => false,
'tableOptions' => [
'class' => "table table-striped"
],
'columns' => [
[
'attribute' => 'title',
],
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}'
],
],
]);
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}'
],
), thanks to which we go to the transition to the desired record, this transition was 'title' and the column in which it is located? Answer the question
In order to leave comments, you need to log in
Good afternoon.
[
'template' => '{view}',
'buttons' => [
'view' => function($url, $model, $key){
return Html::a($model->title, $url)
}
]
]
[
'attribute' => 'title',
'value' => function($model){
return Html::a($model->title, ['controller/action', 'id' => $model->id])
}
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question