Accessing Object of Magento Admin Grid via Java-Script(通过 JavaScript 访问 Magento Admin Grid 的对象)
问题描述
我想访问 Magento Adminhtml Grid 的 JavaScript 对象.我想在我的对话框关闭并且对控制器的 Ajax 请求完成后重新加载网格.
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.
如果我修改 grid.js,这很容易实现.但是我不想修改magento本身的grid.js.
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
如果你像这样在 Grid.php 中设置网格:
If you setup the grid in Grid.php like this:
parent::__construct();
$this->setId('your_grid_id');
.
.
.
来自javascript,网格对象是
from javascript, grid object is
your_grid_idJsObject
在你的情况下
your_grid_idJsObject.reload();
这篇关于通过 JavaScript 访问 Magento Admin Grid 的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:通过 JavaScript 访问 Magento Admin Grid 的对象
基础教程推荐
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
