title: Yii custom ajax search in gridview with different models
body: <p>I want to customise the yii gridview search for my model with some checkboxes above the gridview that don't belong to the model but will affect the search result. It's about a contact search that should be modified by flags user can select. I don't know how I can do ajax requests so that the value of the checkboxes are avaiable in the model search() function. </p>
  
  <pre><code>&lt;?php
  // print all flags
  echo '&lt;table class="flag_table"&gt;&lt;tr&gt;';
  echo '&lt;tr&gt;&lt;th&gt;Flags:&lt;/th&gt;&lt;/tr&gt;';
  foreach($flagRows as $key=&gt;$value)
  {
      echo '&lt;td&gt;';
      echo CHtml::tag('span', array(), "$value-&gt;flag:&amp;nbsp;");
      echo CHtml::checkBox('flagId__'.$value-&gt;id, false, array('value'=&gt;"$value-&gt;id"));
      echo '&lt;/td&gt;';
  }
  echo '&lt;/tr&gt;&lt;/table&gt;';
  
  $this-&gt;widget('zii.widgets.grid.CGridView', array(
  'id'=&gt;'contact-grid',
  'dataProvider'=&gt;$model-&gt;search(),
  'filter'=&gt;$model,
  //'cssFile'=&gt;Yii::app()-&gt;request-&gt;baseUrl.'/css/grid_view.css',
  'columns'=&gt;array(
      'firm',
      'last_name',
      'forename',
      'street',
      'city',
      'mobile_number',
      'email',
      'search_word',
      array(
          'class'=&gt;'CButtonColumn',
      ),
  ),
  )); ?&gt;
  </code></pre>
  
  <p>Any ideas?</p>