In the CGridView, i want to show my value, but it show value null by $model:
var_dump($model->status);
// Result is NULL
But in CGridView it show the exact value,
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'form-grid',
'dataProvider' => $model->search(),
'filter' => $model,
'columns' => array(
array(
'name'=>'status',
'value'=> isset($model->status) ? $model->getStatus($model->status) : '',
),
array(
'name'=>'level',
'value'=> isset($model->level) ? $model->getLevel($model->level) : '',
),
'survey_No',
array(
'class' => 'CButtonColumn',
'buttons' => array(
'view' => array(
'url' => '$this->grid->controller->createUrl("view", array("form"=>$data->primaryKey))',
'options' => array('title' => 'View'),
),
'update' => array(
'url' => '$this->grid->controller->createUrl("edit", array("form"=>$data->primaryKey))',
'options' => array('title' => 'Edit'),
),
'delete' => array(
'url' => '$this->grid->controller->createUrl("delete", array("form"=>$data->primaryKey))',
'options' => array('title' => 'Delete'),
)
),
),
),
));
and the value is 2.
Where is my mistake?