Tuesday 15 June 2010

php - how to show select name instead of value in magento grid -



php - how to show select name instead of value in magento grid -

i want show marketplace dropdown name in magento grid write in code display marketplace value.bellow code

protected function _preparecolumns() { $this->addcolumn('marketplace', array( 'header' => mage::helper('adminhtml')->__('marketplace'), 'align' =>'right', 'width' => '10px', 'index' => 'marketplace', )); $this->addcolumn('action', array( 'header' => mage::helper('adminhtml')->__('action'), 'width' => '100px', 'type' => 'action', 'getter' => 'getid', 'actions' => array(array( 'caption' => mage::helper('adminhtml')->__('edit'), 'url' => array('base' => '*/*/edit'), 'field' => 'id' )), 'filter' => false, 'sortable' => false, 'index' => 'id', )); homecoming parent::_preparecolumns(); }

could please point out doing wrong not have much experience in magento.

thanking in advance

add field type market place like...

$this->addcolumn('marketplace', array( 'header' => mage::helper('adminhtml')->__('marketplace'), 'align' =>'right', 'width' => '10px', 'index' => 'marketplace' 'type' => 'options', 'options' => array( 6 => '6', 5 => '4', 4 => '4', 3 => '3', 2 => '2', 1 => '1' ), ));

php magento

No comments:

Post a Comment