wbraganca / yii2-dynamicform

It is widget to yii2 framework to clone form elements in a nested manner, maintaining accessibility.
Other
436 stars 439 forks source link

How to display modelsItem in view.php? #228

Open baladewa88 opened 7 years ago

baladewa88 commented 7 years ago

Hi. Thank you for your extension. But i have a question. How to display PO_ITEMS in ActionView.

I code just like in the ActionView on the documentation but how to display that in ListView / GridView in Views>view.php of Rasio Folder?

I try this in actionView

public function actionView($id) {

    $model = $this->findModel($id);
    $addresses = $model->rasioItems;

    return $this->render('view', [
        'model' => $model,
        'item' => $addresses,
    ]);
}

and this code in view.php

<?= GridView::widget([ 'dataProvider' => $item, 'columns' => [ ['class' => 'yii\grid\SerialColumn'],

        'idjenisbtp',
        'takaran',
    ],
]); ?>

but it didn't work. Could you tell me how to do it right?

leonardojulius commented 6 years ago

does it says any error?