Sort On A Ccheckboxcolumn In Gridview

I have a GridView with a list of names and checkboxes whether they have pictures associated with them. I’d like to be able to sort by the checkbox header to easily see the students that do or do not have pictures.

The CCheckboxColumn in the GridView looks like this:




        'columns'=>array(

            array('name'=>'pictures', 

                'header'=>'Pictures Uploaded', 

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

                'class'=>'CCheckBoxColumn',

                'selectableRows' => 2,

                'checked'=>'$data->pictures' , 

                'headerTemplate' =>"Pictures Uploaded",

                'htmlOptions'=>array('style'=>'width: 10px;text-align:center','class'=>'pictures_checkbox'),

                'headerHtmlOptions'=>array('style'=>'width: 10px;text-align:center')),



And I have a search function in the model like this:




    public function search() {

        $criteria=new CDbCriteria;

        $criteria->compare('first_name',$this->first_name,true);

        $criteria->compare('last_name',$this->last_name,true);

        $criteria->with=array('teacher');

        return new CActiveDataProvider($this, array(

            'criteria'=>$criteria,

            'sort'=>array(

                'defaultOrder'=>'teacher_id ASC, last_name ASC',

            ),

            'Pagination' => array (

                  'PageSize' => 100

              ),

        ));

    }



However the ‘pictures’ column header doesn’t change to allow it to sort, although the other columns work. I’ve also tried explicitly setting the ‘pictures’ attributes under the sort array, however that had no affect either.

Is it even possible to sort on a CCheckboxColumn?

Thanks,

Bob