Revision #2 has been created by Kostas Apazidis (KonApaz) on Jun 24, 2013, 11:21:15 PM with the memo:
multiple CActiveDataProviders in one CGridView
« previous (#1) next (#3) »
Changes
Title
unchanged
multiple CActiveDataProviders in one CGridView
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
multiple, CActiveDataProvider, CGridView, in one, CArrayDataProvider
Content
changed
[...]
for ($i = 0; $i < $prov2->totalItemCount; $i++) {
$data = $prov2->data[$i];
array_push($records, $data);
}
//or you could use $records=array_merge($prov1->data , $prov2->data);
$provAll = new CArrayDataProvider($records,
array(
'sort' => array( //optional and sortring
'attributes' => array(
'id', 'title',),
),[...]