title: Inserting Active Record Data into Yii's CGRidView widget
body: <p>I have a table in mysql that I want to display with the <code>CGridView</code> widget.  Here is my code thus far:</p>
  
  <p>My Controller file (snipped of course):</p>
  
  <pre><code>public function actionIndex()
  {
    //call the AR table model
    $model = new ViewResults();
    //This generates a simple "SELECT * FROM table statment".
    $list = $model-&gt;findAll();
    $this-&gt;render('index', array('list'=&gt;$list));
  }
  </code></pre>
  
  <p>My View file looks like(snipped):</p>
  
  <pre><code>&lt;?php $this-&gt;widget('zii.widgets.grid.CGridView', array(
  'dataProvider'=&gt;$list,
   )); ?&gt;
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <p>Call to a member function getData() on a non-object in C:\xampp\framework\zii\widgets\CBaseListView.php on line 105</p>
  
  <p>Here is the source code to the <a href="http://code.google.com/p/yii/source/browse/tags/1.1.7/framework/zii/widgets/CBaseListView.php" rel="nofollow">CBaseListView.php</a> file.</p>
  
  <p>I'm pretty sure I'm screwing up by putting the list object in the widget.  Is there something I have to do to <code>$list</code> before I pass it to the widget?</p>