this is way to add dropdown / select field in magento admin grid
file path : app\code\local\Module_Name\Company_Name\Block\Adminhtml\block_name\Grid.php
file path : app\code\local\Module_Name\Company_Name\Block\Adminhtml\block_name\Grid.php
$yesnoOptions = array('0' => 'No','1' => 'Yes','' => 'No');
$this->addColumn('is_vendor', array(
'header' => Mage::helper('customer')->__('Is Vendor'),
'index' => 'is_vendor',
'type' => 'options',
'options' => $yesnoOptions,
));
I think you can also make use of this:
ReplyDeleteMage::getModel('adminhtml/system_config_source_yesno')->toOptionArray(
no, you can't
Deleteyes, you can!
DeleteYou can use this...
ReplyDeleteMage::getModel('adminhtml/system_config_source_yesno')->toArray()