I want to add some column as a drop drown with some values (not in grid)but I can't get Them , I don't know why !
Test 1:
$this->addColumn('somme', array(
'label' => Mage::helper('module')->__('Somme'),
'style' => 'width:100px',
'type' => 'options',
'options' => array(0 => $this->__('Value1'), 1 => $this->__('Value2')),
'sortable' => false,
));
Test 2:
$this->addColumn('somme', array(
'label' => Mage::helper('module')->__('Somme'),
'style' => 'width:100px',
'type' => 'options',
'renderer' => 'Module_ModuleName_Block_Config_Adminhtml_Renderer_Dropdown',
));
Module_ModuleName_Block_Adminhtml_Renderer_Dropdown
class Module_ModuleName_Block_Config_Adminhtml_Renderer_Dropdown extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract{
public function render(Varien_Object $row) {
$html = '<select>';
$html .= '<option value="0">Value1</option>';
$html .= '<option value="1">Value2</option>';
$html .= '</select>';
return $html;
}
}