title: merge two CActiveDataProvider and show result in a CGridview in yii
body: <p>I have 2 model :</p>
  
  <pre><code> $model = new ProfileInformation('internetConection');
   $modeliner = new ProfileInformation('inerConection');
  </code></pre>
  
  <p>I show those in 2 CGridView in yii how can show in a CGridView </p>
  
  <p>Model:</p>
  
  <pre><code> public function internetConection() {
          // @todo Please modify the following code to remove attributes that should not be searched.
  
      $criteria = new CDbcriteria();
      $criteria-&gt;with = array('user');
      $criteria-&gt;condition = 'serviceId=:serviceId';
      $criteria-&gt;params = array(':serviceId' =&gt; '1');
      $criteria-&gt;group = 't.user_Id';
      $criteria-&gt;select = array('count(distinct psh_profile_information_services.profileInformationId) AS internetConectionCount');
      $criteria-&gt;join = 'left join psh_profile_information_services on t.id=psh_profile_information_services.profileInformationId';
      $criteria-&gt;order = 't.id';
      $criteria-&gt;compare('user_Id', $this-&gt;user_Id);
      $criteria-&gt;compare('isService', $this-&gt;isService, true);
  
  
      return new CActiveDataProvider($this, array(
          'criteria' =&gt; $criteria,
      ));
  }
  
  public function inerConection() {
      // @todo Please modify the following code to remove attributes that should not be searched.
  
      $criteria = new CDbcriteria();
      $criteria-&gt;with = array('user');
      $criteria-&gt;addInCondition('serviceId', array(2, 3, 4, 5));
      $criteria-&gt;group = 't.user_Id';
      $criteria-&gt;select = array('count(distinct psh_profile_information_services.profileInformationId) AS inerConectionCount');
      $criteria-&gt;join = 'left join psh_profile_information_services on t.id=psh_profile_information_services.profileInformationId';
      $criteria-&gt;order = 't.id';
      $criteria-&gt;compare('user_Id', $this-&gt;user_Id);
      $criteria-&gt;compare('isService', $this-&gt;isService, true);
  
  
      return new CActiveDataProvider($this, array(
          'criteria' =&gt; $criteria,
      ));
  }
  </code></pre>
  
  <hr>
  
  <p>I am using 2 CgridView now , but if i can show in a table it is very good. 
  eache result search have a new field : inerConectionCount and internetConectionCount.</p>
  
  <p>table for internetConectionCount
  <img src="https://i.stack.imgur.com/o1mFw.jpg" alt="table for internetConectionCount"><br>
  table for inernetConectionCount
  <img src="https://i.stack.imgur.com/a2hI8.jpg" alt="table for inernetConectionCount"> </p>
  
  <p>I want it:
  <img src="https://i.stack.imgur.com/BmK0F.jpg" alt="I want it:"></p>
  
  <pre><code> $this-&gt;widget('zii.widgets.grid.CGridView', array(
          'id' =&gt; 'profile-information-grid1',
          'dataProvider' =&gt; $dataprovider
              'columns' =&gt; array(
              array(
                  'header' =&gt; '',
                  'value' =&gt; '$this-&gt;grid-&gt;dataProvider-&gt;pagination-&gt;offset + $row+1', //  row is zero based
              ),
  
               array(
                  'name' =&gt; 'ProfileInformation.user.organization',
                  'value' =&gt; 'CHtml::encode($data-&gt;user-&gt;organization)',
  
              ),
  
              array(
                  'name' =&gt; 'ProfileInformation.user.scope',
                  'value' =&gt; 'CHtml::encode($data-&gt;user-&gt;scope-&gt;name)',
                  'filter' =&gt; Scope::model()-&gt;options,
              ),
              array(
                  'name' =&gt; 'id',
                  'value' =&gt; 'CHtml::encode($data-&gt;id)',
              ),
  
            'inerConectionCount',
  
  
  
          ),
      ));
  </code></pre>