Display And Search The Fullname Consisting Of First,middle And Last Name

Hi there. Actually i want to display the fullname of student in CgridView. there is no attribute in the model named fullname. There are attributes like first name, middle name, last name. Using these i need to show full name. Now i have made a function which returns me the full name and then i use it in CgridView.

But the problem is that CGridview does not show filter field for the full name in CgridView. I thought to change the search like.

public function customsearch()



            $criteria=new CDbCriteria;



            return new CActiveDataProvider($this, array(




Here is my controller action in which i render the view containing CgridView

 public function actionPromoteIndividual()


             $student=new Student('customsearch');













                $dataProvider=new CActiveDataProvider('Student',array(









Here is my view for GridView


$gridColumns = array(

//    array(

//        'name' => 'firstLetter',

//        'value' => '$data->class->standard_name',

//        'headerHtmlOptions' => array('style' => 'display:none'),

//        'htmlOptions' => array('style' => 'display:none')

//    ),


        'header' => 'Name',

        'value' => '$data->fullname',

        'htmlOptions' => array('style' => 'text-align:center;')



        'header' => 'Status',

        'value' => '$data->status->key',

        'htmlOptions' => array('style' => 'text-align:center;')



        'type' => 'raw',

        'header' => '',

        'value' => '"<a class=\"btn btn-danger\" href=\"".Yii::app()->createUrl("/dmo/GradeChange/promoteIndividual", array("id"=>$data->id))."\">Select</a>"',

        'htmlOptions' => array('style' => 'text-align:center;',








$this->widget('bootstrap.widgets.TbExtendedGridView', array(


    'type' => 'striped bordered',

    'dataProvider' => $student->customsearch(),

    'template' => "{items}",

    'columns' => $gridColumns,



Now my question is how to make to filter the fullname in GridView. What i am doing wrong in my customSearch method?

Using the "getter" and "setter" method will be helpful in this case.