L
L
Lander2016-04-19 14:23:12
Yii
Lander, 2016-04-19 14:23:12

Is there any way to write this in yii2?

Own subject

<?=GridView::widget([
...
  'columns' => [
...		
[
  'label' => 'Контакты',
  'content' => function($model) { return $this->render('clients/_contact', [ 'model' => $model ]); }
],
...

upd: I'll explain: I just thought that there might be some kind of parameter of the 'itemView' type in the ListView, to which the widget automatically feeds the model. I dug into the documentation - I did not find it. I decided to ask experienced comrades. :) Thanks to everyone who answered!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Gogolinsky, 2016-04-19
@usdglander

You need to make your own class that extends yii\grid\DataColumn

S
Sergey Semenko, 2016-04-19
@abler98

Make a manual withdrawal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question