protected function _changeActionColumnToAjax(Mage_Index_Block_Adminhtml_Process_Grid $grid) { $grid->getColumn('action')->setActions(array(array('caption' => Mage::helper('index')->__('Reindex Data'), 'url' => array('base' => '*/*/reindexProcessAjax'), 'onclick' => "new IndexerStats.AjaxRequest(this); return false;", 'field' => 'process'))); /* * We use the IndexerStats.AjaxRequest class only for response here, normal Ajax.Request * is hard coded in grid.js as only non-submitting action * * eval'd "complete" value gets used as callback in JavaScript. */ $grid->getMassactionBlock()->setUseAjax(true)->getItem('reindex')->setUrl($grid->getUrl('*/*/massReindexAjax'))->setComplete('(rq = new IndexerStats.AjaxRequest()).onMassComplete.bind(rq)'); }