I have this code:
$grid->addColumn('action',array(
'header' => $this->__('Action'),
'type' => 'action',
'action' => array(
'label' => $this->__('Join Program'),
'url' => 'urlstring/index/join',
'name' => 'id',
'field' => 'program_id'
)
));
I want to set multiple url parameters. So in other word I need to achieve something like this:
$grid->addColumn('action',array(
'header' => $this->__('Action'),
'type' => 'action',
'action' => array(
'label' => $this->__('Join Program'),
'url' => 'urlstring/index/join',
'name' => 'id',
'field' => 'program_id',
'name' => 'PARAMETER2',
'field' => 'PARAMETER2'
)
));
This does not work. What is the proper way to achieve this? How can I set PARAMETER2?
Best Answer
I found some examples from Magento core
/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php
:or from
/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php
:We see here an easiest way to send multiple parameters through url