CGridview help us display data get from database as a table. By using Cgridview, we can do search, filter or pagination very easy. The point is how can we modify this table.
Here is the way.

Add checkbox to the first column.

'columns' => array(
    array(
        'id'=>'checkbox',
        'class'=>'CCheckBoxColumn',
        'selectableRows' => '10',
    ),
)

In line 5, selectableRows means when you click check all checkbox, it’ll automatically check the first 10 rows, increase this number which is suitable for your yii number table row.

Display data from database

'columns' => array(
    array(
        'name' => 'my_title',
        'value' => '$data->title',
    ),
)

In line 3, the name ‘my_title’ will be display in web page as “my title”. The “_” between word and word help yii recognize it’s plain text.
In line 4, value will be called from database.
You also can use php script in Cgridview, as my example below.

'columns' => array(
   array(
        'name'=>'Date_create',
        'value'=>'date("d-m-Y", strtotime($data->date_create))',
    ),
)

Add span tag to cell

array(
 'name' => 'Views',
 'type' => 'html',
 'value' => function($data)
 {
  return '<span class="label label-info" >$data->views</span>';
 }
),

We must set type as html, this way Cgridview will read value as html with all tag inside. And value will be changed to a function of PHP.

Add dropdownlist to cell

array(
 'name' => 'Priority',
 'type' => 'html',
 'value'=> function($data)
 {
  echo '<select class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                </select>' ;
 }
),