title: using an array as the data-source for CGridView
body: <p>Im hoping this will work.. Im writing and invoicing application and would like to hold the current invoice in an array which can be housed in a blob field. This would also be used for archive changes etc. </p>
  
  <p>The sale items of the the invoice are displayed using CGridView. The only thing is all the documentation says the data source is supposed to be an IDataProvider. I don't want to store the entire object in my Db but something similar to this:</p>
  
  <pre><code>invoice-&gt;array(
                  InvoiceHeader-&gt;array(//header information),
                  InvoiceItems-&gt;array(
                                     item_1-&gt;array( 
                                                   item_id-&gt; '1',
                                                   item_count-&gt;'3',
                                                   ....
                                                   ),
                                     ),
                 ),
  </code></pre>
  
  <p>I would  then like to do this in my view:</p>
  
  <pre><code>$this-&gt;widget('zii.widgets.grid.CGridView', array(
                 'dataProvider'=&gt;$this-&gt;invoiceItems,
                ));
  </code></pre>
  
  <p>-- side note. The permanent storage is a series of tables, this would be used to hold active records encase of browser errors, etc. The current system does this  directly in the tables but leads to non concurrent invoice numbers and inaccurate stats.</p>