title: How to get CGridView for the SQL Query result?
body: <p>I try the following query, and which produces an array,</p>
  
  <pre><code>$user = Yii::app()-&gt;reg-&gt;createCommand()
  -&gt;select('studentID')
  -&gt;from('Students')
  -&gt;queryAll();
  </code></pre>
  
  <p>But, when i try to get the value of the query in CGridview, Im getting the error,</p>
  
  <pre><code>Property "CDbCommand.0" is not defined.
  </code></pre>
  
  <p>here is the code for gridview,</p>
  
  <pre><code>$this-&gt;widget('zii.widgets.grid.CGridView', array(
  'id'=&gt;'students-grid',
  'dataProvider'=&gt; new CSqlDataProvider($user),
  ));
  </code></pre>