1
我有同样的模块2个格(我需要让他们在同一模块中)。 当我点击列的顶部时,网格本身加载它本身。
下面是我的代码: Myname_Blink_Adminhtml_BlinkController
public function keywordsAction()
{
$this->loadLayout();
$this->_setActiveMenu('blink/keywords');
$this->_addContent($this->getLayout()->createBlock('Myname_Blink_Block_Adminhtml_Keywords_Grid'));
$this->renderLayout();
}
我的块文件:Myname_Blink_Block_Adminhtml_Keywords_Grid延伸
class Myname_Blink_Block_Adminhtml_Keywords_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
public function __construct()
{
parent::__construct();
$this->setId('keywords_grid');
$this->setDefaultSort('keywords_id');
$this->setDefaultDir('ASC');
//$this->setSaveParametersInSession(true);
$this->setUseAjax(true);
}
至于建议这个帖子:Multiple grid in Magento admin
我删除的文件: => Myname_Blink_Block_Adminhtml_Keywords => app \ design \ adminhtml \ default \ default \ layout \ myname \ blink.xml
谢谢!它解决了我的问题。祝你有美好的一天,再次感谢! –
我的荣幸!!!! –