you have to include the foreign key in search criteria in the model:
first :
array(
'header'=>'Foo',
'name' => 'foo.name',
'value' => '$data->foo->Name',
'filter' => CHtml::textField('foreign',''), // change like this
),
then in model, search method:
$criteria->with('NameOfRlation');
$f = Yii::app()->request->getParam('foreign' , null);
if(!empty($f))
$criteria->compare('t.Field' , $f , true);