Reputation: 372
I am trying to pass data from another model to my view page with CGridView and controller. It is showing some error:
urlencode() expects parameter 1 to be string, array given
I created a function for dataProvider.
public function actionClassA()
{
$dataProvider = new CActiveDataProvider('Codesparam', array(
'criteria'=>array(
'condition'=>'cm_type="Branch"',
),
));
$this->render('admina', array('dataProvider' => $dataProvider));
}
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'productmaster-grid',
'dataProvider'=>$dataProvider,
//'filter'=>$result,
));
Upvotes: 0
Views: 188