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:



                'header'=>'Pictures Uploaded', 

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


                '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;




        return new CActiveDataProvider($this, 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?