Answer the question
In order to leave comments, you need to log in
Why doesn't the onclick of the GridView fire?
It is necessary that an action occurs in the GridView when a column is clicked, but for some reason I simply do not have the ooClick attribute on the a tag
[
'attribute' => 'id',
'label' => 'Выбрать водителя',
'format' => 'html',
'filter' => false,
'value' => function ($model) {
$value = '<a onclick="parent.setDrivers('.$model->id.')" class="click btn btn-danger">Выбрать</a>';
return $value ;
}
]
Answer the question
In order to leave comments, you need to log in
try like this:
$onclick = "parent.setDrivers('".$model->id."')";
return Html::a('#','выбрать',['onclick'=>$onclick]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question