diff --git a/framework/yii/grid/DataColumn.php b/framework/yii/grid/DataColumn.php index 9e0ec79..478394b 100644 --- a/framework/yii/grid/DataColumn.php +++ b/framework/yii/grid/DataColumn.php @@ -115,7 +115,9 @@ class DataColumn extends Column { if (is_string($this->filter)) { return $this->filter; - } elseif ($this->filter !== false && $this->grid->filterModel instanceof Model && $this->attribute !== null) { + } elseif ($this->filter !== false && $this->grid->filterModel instanceof Model && + $this->attribute !== null && $this->grid->filterModel->isAttributeActive($this->attribute)) + { if (is_array($this->filter)) { $options = array_merge(array('prompt' => ''), $this->filterInputOptions); return Html::activeDropDownList($this->grid->filterModel, $this->attribute, $this->filter, $options);