Jquery show render page in gridview yii2 -


i trying create feedback page put gridview on page show feedbacklist, , have plan put list replay under current comment.

enter image description here following code made:

  'columns' => [         [   'attribute' => 'iduser.photo',             'format' => 'html',             'value'=>  function($data) { return html::img($data->imageurl) . " <p class='feedback-username'>" . $data->username . "</p>"; },             'contentoptions'=>['style'=>'max-width: 10px; max-height: 10px'],         ],          [   'attribute' => 'komentar',             'format' => 'raw',             'value' => function($model) { return $model->komentar  ."<br><p class='feedback-date'>". $model->tanggal ."</p><hr><div id='replay'><ul></ul></div>";},         ],          [   'class' => 'yii\grid\actioncolumn',             'contentoptions'=>['style'=>'width: 5px;'],             'template' => '{update} {delete}',             'visible' => !yii::$app->user->isguest,         ], 

i want use jquery slip list replay in id = replay > ul

this controller made:

public function actionreplay() {     $searchmodel = new feedbacksearch();     $dataprovider = $searchmodel->searchreplay();;      return $this->render('replay', [         'searchmodel' => $searchmodel,         'dataprovider' => $dataprovider     ]); } 

and model:

public function searchreplay() {     $dataprovider = feedback::find()->where("replayed = '1'")->all();     return $dataprovider; }  

the view show list:

<?php foreach ($dataprovider $model)  {     echo $model->komentar; } 

how can put list data in grid view? think of jquery still have no idea.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -