add a filter with a checkbox

Hi everyone :)

In the CGridView widget,i want to add a checkbox filter instead of a dropdownlist, but i don’t know what is the right syntax to do so. Right now, i have this piece of code:


'filter'=>$model->status, // i have a dropdownlist of 2  status (success, failure)

and i want to replace this with a checkbox:


'filter'=>CHtml::checkBox($model,'status',array('checked'=>'true'))

but i have the following error: [color="#FF0000"]Object of class User could not be converted to string

[/color]

Do you have an idea what is the right syntax to use a checkbox as a filter ?

Thanks in advance:)

use activeCheckBox since search form use CActiveForm




'filter'=>CHtml::activeCheckBox($model,'status',array('checked'=>'true')),