I am new to yii. In my blocked-recruiter view's admin.php page i have a CGridView widget. the candidate_id is the foreign key of candidate table. So now in blocked recruiter view the candidate_id is coming by default. But i want to show the candidate name here, which is in the candidate table. to get the candidate name by candidate_id i have to use Candidate::model()->findByAttributes('id'=>$candidate_id)->name; But i am not able to use the code, basically i dont khow how do i use it.
Code in admin.php of blocked-recruiter view page.
$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'blocked-recruiter-grid',
    'dataProvider'=>$model->search(),
    'filter'=>$model,
    'columns'=>array(
        'id',
        'candidate_id',
        'recruiter_id',
        array(
            'class'=>'CButtonColumn',
        ),
    ),
));
So, please help to to get the candidate_name here instate of candidate_id.
Thank You.