jruzafa
11/27/2013 - 9:23 PM

magento grid

magento grid

// remove add button

parent::__construct();
$this->removeButton('add');

// Options value select

// Devopensource_ExtendRma_Block_Rma_Adminhtml_Status_Grid
$this->addColumn(
            'trigger',
    array(
        'header' => $this->__('Trigger'),
        'index'  => 'trigger',
        'width'  => '100px',
        'type' => 'options',
        'options' => Mage::getModel('devopenextrma/system_config_source_trigger')->toArrayGird()
    )
);

//Devopensource_ExtendRma_Model_System_Config_Source_Trigger
public function toArray()
  {
      return array(
          'no_action'             => Mage::helper('devopenextrma')->__('No actions'),
          'items_with_shipping'   => Mage::helper('devopenextrma')->__('Return products + shipping'),
          'items_only'            => Mage::helper('devopenextrma')->__('Return products (excluding shipping charges)')
      );
  }