Yii Cgridview filter not working?
<p>I am trying to implement a dropdown filter in Cgridview,   The column is from another table. </p>

<pre><code> //model search code 

  //person table 
   public function search(){
    $criteria=new CDbCriteria;
      $criteria-&gt;alias='per';      
    $criteria-&gt;compare('LastName',$this-&gt;LastName,true);    
    $criteria-&gt;compare('FirstName',$this-&gt;FirstName,true);         
     $criteria-&gt;join='right JOIN person_surveys ps ON ps.id = per.P_Id'; 

   }
  //relation to person survey

   public function relations()
{

    return array(

        'user' =&gt; array(self::BELONGS_TO, 'PersonSurvey', 'P_Id'),

    ); 

}

   //person survey table model search 

    public function search()
{


    $criteria=new CDbCriteria;    
    $criteria-&gt;compare('person_id',$this-&gt;person_id,true);    
    $criteria-&gt;compare('survey_ids',$this-&gt;survey_ids,true);          
     $criteria-&gt;join='left JOIN persons ps ON ps.id = per.P_Id';  

   }  

   //controller 
   public function actiongriddisplay(){

        $model2=new Persons('search'); 
         if(isset($_GET['ajax'])){ 

        $model2-&gt;attributes =$_GET['Persons'];
        $this-&gt;render('griddisplay',array('model2'=&gt;$model2));    
        }

        else{

            $this-&gt;render('griddisplay',array('model2'=&gt;$model2)); 
     }


    }

    //in view file

    $this-&gt;widget('zii.widgets.grid.CGridView', array(      
        'dataProvider' =&gt; $model2-&gt;Search(),
        'filter' =&gt; $model2,
        'ajaxType'=&gt;'GET',
       // 'ajaxUpdate'=&gt;'items',
        //'ajaxUrl' =&gt;$this-&gt;createUrl('userManagement'),   
        'columns' =&gt; array(             
              array(
         'name' =&gt; 'FirstName',
         'header'=&gt;'Full Name', 

            ),
           array(
     'name' =&gt; 'user.survey_ids',
     'header'=&gt;'Survey ids',    

    'filter'=&gt;CHtml::activeDropDownList($model2  ,'survey_ids', array('224'=&gt;'224','223'=&gt;'223','225'=&gt;'225')),  

           'value'=&gt;'isset($data-&gt;user-&gt;survey_ids)?$data-&gt;user-&gt;survey_ids:null'

        ),   
</code></pre>

<p>I have put the search on, in models. why is the dropdown filter not working?
Why this is not working please help?</p>