$model
doesn't affect $myDataProvider
since the data provider is not obtained using this model.
$model->search()
returns a CActiveDataProvider
which contains a CDbCriteria
instance. Different CDbCriteria
can be combined using mergeWith()
. So if you would like the data to be filtered using the values from the $model
...
$model->setAttributes($attr);
$newDataProvider=$model->search();
$myDataProvider->criteria->mergeWith($newDataProvider->criteria);
$this->widget('zii.widgets.grid.CGridView', array(
...