Answer the question
In order to leave comments, you need to log in
Yii multiple cgridview from model?
We need to make several cgridviews.
In the model I write (for one) something like the following
for($i = 1, $cnt = count($rows); $i < $cnt; $i++) //формируем столбцы
{
$id[] = $rows[$i]['id'];
}
$criteria->addInCondition('id', $id);
Answer the question
In order to leave comments, you need to log in
you can also redefine the search () function in the model public function mysearch($fact_id, $ware_id)
in a view
for($i = 1, $cnt = count($rows); $i < $cnt; $i++) //формируем столбцы
{
$this->widget('bootstrap.widgets.TbExtendedGridView', array(
'filter'=>'false',
'type'=>'striped bordered',
'dataProvider' => $model->mysearch($rows[$i]['fact_id'],$rows[$i]['ware_id']),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question