0

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.

controller

        public function actionClassA()
    {
    $dataProvider = new CActiveDataProvider('Codesparam', array(
        'criteria'=>array(
            'condition'=>'cm_type="Branch"',
        ),
    ));
     $this->render('admina', array('dataProvider' => $dataProvider));
   }

view

      $this->widget('zii.widgets.grid.CGridView', array(
  'id'=>'productmaster-grid',
  'dataProvider'=>$dataProvider,
  //'filter'=>$result,
  ));
vvvvv
  • 25,404
  • 19
  • 49
  • 81
Selim Reza
  • 372
  • 8
  • 20

0 Answers0