i’m using CGridView with my own search function in the model, data retrieves properly but filters are not working, basically i have clone “search” function but the behavior is different and i dont know why, this is may code
CGridView:
$this->widget(‘zii.widgets.grid.CGridView’, array(
'id'=>'responsables-grid1',
'dataProvider'=>$modRespSearchC->searchCargo(),
'filter'=>$modRespSearchC,
'columns'=>array(
'apell1Resp',
'apell2Resp',
'cargoResp',
Controller
$modRespSearchC=new Responsables(‘searchCargo’);
$modRespSearchC->unsetAttributes();
if(isset($_GET['Responsables']))
$modRespSearchC->attributes=$_GET['Responsables'];
Model
public function searchCargo()
{
$criteria=new CDbCriteria;
$criteria->compare('cargoResp',1,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
how you can see is very basic, work but not filtering, what i’m missing??