Public Member Functions | |
render (Varien_Object $row) |
Definition at line 35 of file Select.php.
render | ( | Varien_Object $ | row | ) |
Renders grid column
Varien_Object | $row |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract.
Definition at line 44 of file Select.php.
00045 { 00046 $html = '<select name="'.( $this->getColumn()->getName() ? $this->getColumn()->getName() : $this->getColumn()->getId() ).'" ' . $this->getColumn()->getValidateClass() . '">'; 00047 $value = $row->getData($this->getColumn()->getIndex()); 00048 foreach ($this->getColumn()->getOptions() as $val => $label){ 00049 $selected = ( ($val == $value && (!is_null($value))) ? ' selected="selected"' : '' ); 00050 $html.= '<option value="' . $val . '"' . $selected . '>' . $label . '</option>'; 00051 } 00052 $html.='</select>'; 00053 return $html; 00054 }