Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Select Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Select:

Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract Mage_Adminhtml_Block_Abstract Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 render (Varien_Object $row)


Detailed Description

Definition at line 35 of file Select.php.


Member Function Documentation

render ( Varien_Object row  ) 

Renders grid column

Parameters:
Varien_Object $row
Returns:
string

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:09 2009 for Magento by  doxygen 1.5.8