CGridView in other Controller

Goods yii comunity!

I’m trying to use CGridView in view _form using model from other controller this is the code

$model2= Equipo::model();

	$this->widget('zii.widgets.grid.CGridView', array(


	'id'=>'equipo-grid',


	'dataProvider'=>$model2->search(),


	'filter'=>$model2,


	'ajaxUrl'=>array('equipo/admin'),





	'columns'=>array(


	'idequipo',


	'marca',		


	array(		


	'class'=>'CCheckBoxColumn',	


	),


	


	)


	


	));





 this code work (atach picture 2623

CGridView1.jpg
), the trouble is when you try to search in the CGridView becasuse CGridView load all colums of Equipos` Controllers and i don’t need that.

picture=>2624

CGridView2.jpg

Regards…

remove:

‘ajaxUrl’=>array(‘equipo/admin’),

or provide action that will render grid with same columns. searching and sorting is done by ajax call to action that renders WHOLE PAGE, and then only update grid container matched by container id: "equipo-grid"

thanks redguy i did.

Awesome!!!!!

regards…

i added a feedback to my site

i want to render post _view from my feedbacj controller, how could i do it?

can you upload your code here how you did? I am facing same problem