title: CGridview Filters do not seem to be working
body: <p>Can some one please help me with my filters, they do not seem to be getting data from the database.</p>
  
  <p>View that has the CGridview</p>
  
  <pre><code>$this-&gt;widget('zii.widgets.grid.CGridView', array(
  'id'=&gt;'user-grid',
  'dataProvider'=&gt;$model-&gt;search(),
  'filter'=&gt;$model,
  'enablePagination'=&gt;true,
  'pager'=&gt;array(
      'maxButtonCount'=&gt;'7',
  ),
  'columns'=&gt;array(
      array(
          'name'=&gt;'bt_number',
          'type'=&gt;'raw',
          'value'=&gt;$model-&gt;bt_number,
  
      ),
      array(
          'name'=&gt;'date_time',
          'type'=&gt;'raw',
          'value'=&gt;$model-&gt;date_time,
      ),
              array(
          'name'=&gt;'broker',
          'type'=&gt;'raw',
                      'value'=&gt;$model-&gt;broker,
          'filter'=&gt;Yii::app()-&gt;params['brokers'],
  
      ),
      array(
          'class'=&gt;'CButtonColumn',
          'template'=&gt;'{view}{update}'
      ),
  )
  ));
  </code></pre>
  
  <p>Model the model, I have tried to print out one of the search elements I wa filtering on not nothing display</p>
  
  <pre><code>public function search()
  {
      // Warning: Please modify the following code to remove attributes that
      // should not be searched.
  
      echo "booker ".$this-&gt;broker;// exit;
             //above only displays booker there is nothing in $this-&gt;broker
  
      $criteria=new CDbCriteria;
  
      $criteria-&gt;compare('bt_number',$this-&gt;bt_number);
      $criteria-&gt;compare('sign',$this-&gt;sign,true);
      $criteria-&gt;compare('fm_buys',$this-&gt;fm_buys,true);
      $criteria-&gt;compare('fm_buys_amt',$this-&gt;fm_buys_amt,true);
      $criteria-&gt;compare('against',$this-&gt;against,true);
      $criteria-&gt;compare('bt_sett_date',$this-&gt;bt_sett_date,true);
      $criteria-&gt;compare('bt_order_type',$this-&gt;bt_order_type,true);
      $criteria-&gt;compare('date_time',$this-&gt;date_time,true);
      $criteria-&gt;compare('dealer',$this-&gt;dealer,true);
      $criteria-&gt;compare('rate',$this-&gt;rate,true);
      $criteria-&gt;compare('broker',$this-&gt;broker,true);
      $criteria-&gt;compare('recapped',$this-&gt;recapped,true);
      $criteria-&gt;compare('settled',$this-&gt;settled,true);
      $criteria-&gt;compare('sett_date',$this-&gt;sett_date,true);
  
      return new CActiveDataProvider($this, array(
          'criteria'=&gt;$criteria,
      ));
  }
  </code></pre>
  
  <p>Controller is not getting anything from the $_GET var</p>
  
  <pre><code>public function actionIndex()
  {
      $model=new BrokerTrades('search');
      $model-&gt;unsetAttributes();  // clear any default values
      if(isset($_GET['BrokerTrades']))
          $model-&gt;attributes=$_GET['BrokerTrades'];
  
      print_r($_GET)  ;
      $this-&gt;render('index',array(
          'model'=&gt;$model,
      ));
  }
  </code></pre>
  
  <p>I can not see why this filter is not work please help.</p>