How To Get Issue Type In Admin Page?

Hi,

On page 89, there is talk about converting the type_id to show the actual string in a drop down.

<?php echo $form->dropDownList($model,‘type_id’, $model->getTypeOptions()); ?>

How to get the admin.php to show the Text instead of the type_id in the grid?

Here is a solution I found




$this->widget('zii.widgets.grid.CGridView', array(

    'dataProvider' => $socialChannelDataProvider,

    'columns' => array(

	'name',

	'description',

        array(

            'name' => 'type_id',

            'value' =>'$data->getTypeOptions()'

        ),

    ),

));