Can I Use 2 Models At Once In Cgridview?

Im on a situation that retrieve 2 list of models :A and B. The number of model A = number of model B in the both 2 lists. I would like to show off their combination of attributes in the view but dont know how. CGridView only accept one.

Have you thought of doing a join directly in the model (Data Provider) ?

Or you could make a merge of data and insert them in CArrayDataProvider.

For some reasons, they could not be joined from the database. So I try to merge them by creating new CFormModel within the attributes of both 2 models A and B, then assign their data to the array of new model object. Hope it work.