i had clone search function into model, use it in controller pass to my view to use CGridview, the result data is correct but filters stop working, i can't see any difference so there must be something more else to add. This are the sections of my code: Model:
public function searchCargo()
{
$criteria=new CDbCriteria;
$criteria->compare('cargoResp',1,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
Controller
$modRespSearchC=new Responsables('searchCargo');
$modRespSearchC->unsetAttributes();
if(isset($_GET['Responsables']))
$modRespSearchC->attributes=$_GET['Responsables'];
CGridView:
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'responsables-grid1',
'dataProvider'=>$modRespSearchC->searchCargo(),
'filter'=>$modRespSearchC,
'columns'=>array(
'apell1Resp',
'apell2Resp',
'cargoResp',.....
what i had miss?? how can use filters with my own functions??