title: Populating CGridView one to many relation
body: <p>In my project one of the model named <strong>types</strong> having multiple relation to other models the criteria with part is giving below its like</p>
  
  <pre><code>$criteria-&gt;with = array(
              'category',
              'subCategory',
              'accountsSupplierPriceDetails' =&gt; array(
                  'with' =&gt; 'serviceLevel'
              )
          );
  </code></pre>
  
  <p>the relationship goes like </p>
  
  <ul>
  <li>types - category - relation(1-1) </li>
  <li>types - subcategory - relation(1-1)</li>
  <li>types - accountsSupplierPriceDetails - relation(1-1)</li>
  <li>accountsSupplierPriceDetails - serviceLevel - relation(1-n)</li>
  </ul>
  
  <p>my problem is how to display the names from each table in a grid. the result of (1-n) should be displayed in a dropdownbox. when i try to access the data from column it shows the error <strong><em>Trying to get property of non-object</em></strong> ($data->accountsSupplierPriceDetails->serviceLevel ->name). can anyone please help me.</p>
  
  <p>Thanks in advance.</p>