* @since 24/09/2012 added filterHtmlOptions
*/
public function renderFilterCell()
{
echo CHtml::openTag('td',$this->filterHtmlOptions);
echo '';
$this->renderFilterCellContent();
echo '
';
echo CHtml::closeTag('td');
}
/**
* Renders the filter cell content.
* On top of Yii's default, here we can provide HTML options for actual filter input
* @author Sergii Gamaiunov
*/
protected function renderFilterCellContent()
{
if(is_string($this->filter))
echo $this->filter;
else if($this->filter!==false && $this->grid->filter!==null && $this->name!==null && strpos($this->name,'.')===false)
{
if($this->filterInputOptions) {
$filterInputOptions = $this->filterInputOptions;
if(empty($filterInputOptions['id'])) {
$filterInputOptions['id'] = false;
}
} else
$filterInputOptions=array();
if(is_array($this->filter)) {
$filterInputOptions['prompt'] = '';
echo CHtml::activeDropDownList($this->grid->filter, $this->name, $this->filter, $filterInputOptions);
} else if($this->filter===null) {
echo CHtml::activeTextField($this->grid->filter, $this->name, $filterInputOptions);
}
}
else
parent::renderFilterCellContent();
}
}