Difference between #1 and #2 of
multiple CActiveDataProviders in one CGridView

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',),
),
[...]
4 1
9 followers
Viewed: 33 061 times
Version: 1.1
Category: How-tos
Last updated by: Nashi
Created on: Jun 24, 2013
Last updated: 10 years ago
Update Article

Revisions

View all history