One Gridview Two Dataprovider

Hi guys!

I have two or more dataprovider,





Array

(

    [0] => CActiveDataProvider Object ...

    [1] => CActiveDataProvider Object ...

),




My question :

How can I show this two dataproviders in one cgridview or merge this two dataproviders?





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

   'dataProvider'=><img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />,

));




Hi @drxy

You could merge two CActiveDataProvider results to one CArrayDataProvider and then use it in CGridView

There is also a wiki about this :)

http://www.yiiframework.com/wiki/517/multiple-cactivedataproviders-in-one-cgridview/

Thank you very much. I solved my problem.