Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Massaction Grid js problem
Jr. Member
Total Posts:  4
Joined:  2012-05-03

hi ,
i want to add massaction in my custom block with selectall | unselectall | selectvisible | unselectvisible..

in my custom grid file which is

class Mycompany_Mymodule_Block_Adminhtml_Mymodulesent_Grid extends Mage_Adminhtml_Block_Report_Grid {

public function __construct() {

protected function _prepareCollection() {

return $this;


protected function _prepareMassaction()

$this->getMassactionBlock()->addItem(’delete’, array(
‘label’ => Mage::helper(’mymodule’)->__(’Delete’),
‘url’ => $this->getUrl(’*/*/massDelete’),
‘confirm’ => Mage::helper(’mymodule’)->__(’Are you sure?’)

$this->getMassactionBlock()->addItem(’test’, array(
‘label’ => Mage::helper(’mymodule’)->__(’test’),
‘url’ => $this->getUrl(’*/*/masstest’),
‘confirm’ => Mage::helper(’mymodule’)->__(’Are you sure?’)
$this->getMassactionBlock()->addItem(’status’, array(
‘label’=> Mage::helper(’mymodule’)->__(’Change status’),*/
return $this;

public function getRowUrl($row) {
return false;

public function getReport($from, $to) {
if ($from == ‘’) {
$from = $this->getFilter(’report_from’);
if ($to == ‘’) {
$to = $this->getFilter(’report_to’);
$totalObj = Mage::getModel(’reports/totals’);
$totals = $totalObj->countTotals($this, $from, $to);
return $this->getCollection()->getReport($from, $to);


it perfectly gives me all the data and also gives me selectall | unselectall | selectvisible | unselectvisible .

it also gives me checkbox on which contain ‘item_id’ value..

when i press on either selectall | unselectall | selectvisible | unselectvisible , it gives me error in console
ReferenceError: mymodulesentGrid_massactionJsObject is not defined

please help me to solve this problem

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top