通过Java脚本访问Magento Admin Grid的对象 [英] Accessing Object of Magento Admin Grid via Java-Script

查看:192
本文介绍了通过Java脚本访问Magento Admin Grid的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想访问Magento Adminhtml网格的JavaScript对象。
我想在关闭对话框之后重新加载Grid,并向控制器发送Ajax请求。



如果我修改grid.js,容易做出。但我不想修改magento本身的grid.js。

任何想法如何访问该对象?

最后的答案,但也许它会帮助别人



如果您在Grid.php中设置网格,就像这样:

  parent :: __ construct(); 
$ this-> setId('your_grid_id');



from javascript,grid object is

 your_grid_idJsObject 

您的情况

  your_grid_idJsObject.reload(); 


I would like to access the JavaScript Object of the Magento Adminhtml Grid. I want to reload the Grid after my Dialog is closed an the Ajax-Request to the Controller has finished.

If i modify the grid.js this is easy to make. But i don't want to modify the grid.js of magento itself.

Any ideas how i can access that object?

解决方案

Late answer, but maybe it will help someone

If you setup the grid in Grid.php like this:

parent::__construct();
$this->setId('your_grid_id');
.
.
.

from javascript, grid object is

your_grid_idJsObject

in your case

your_grid_idJsObject.reload();

这篇关于通过Java脚本访问Magento Admin Grid的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆