如何通过为网格提供不同的url来重新加载网格
How to reload grid by providing different url's to grid
我想重新加载我的网格检查不同的单选按钮,但与新的url,我想提供给网格给不同的不同列内网格..
这是我的单选按钮,我想给我的网格不同的url。
{
boxLabel: ' 1', name: 'rb-horiz-3', inputValue: 1,
listeners: {
check: function(){
//what i write here to
// reload grid with different url ....
}}
}
这是我的网格。
{
xtype:'grid',
store:new Ext.data.JsonStore({
id:'store_id',
root:'result',
totalProperty:'total',
fields:[
{name:'rank'},
{name:'pg'},
],
baseParams:{start:0,limit:20},
url:'pgrouting!getGridData.action',//this i want to change on checking of radio button...
autoLoad:true,
method:'POST'}
正如@MMT在评论中所说,将绑定的代理的url设置为新url,然后对商店执行加载。
check: function(){
var url = http://example.com/data; // set the specific url
// what you need here is a reference to your grid or store
var store = grid.getStore(); // get the store from the grid
var proxy = store.getProxy(); // get the proxy from the store
proxy.setUrl(url); // change the url of the proxy
store.load(); // load the new data
}}
检查侦听器中需要的是对网格或网格存储的引用。
相关文章:
- 数据表 AJAX 筛选器重新加载数据
- 如何在新加载的页面上执行(下拉)操作
- 根据上一个选项卡的选择器重新加载选项卡
- 获得“中止,因为不接受 0”并使用反应热加载器重新加载整页
- 咕噜咕噜的手表:实时加载重新加载落后 1 步....
- EXT JS:如何将选定的网格行加载到窗口中
- 如何为新加载的元素提供JQuery UI工具提示
- 如何在新加载的页面上使用相同的JavaScript代码(通过重定向)
- 使用PHP或Javascript检测页面刷新或新加载
- ExtJS无限网格永远加载(totalProperty==pageSize)
- 砌体重新加载&reloadItems不起作用
- 自动加载所有网格的加载存储
- 如何使javascript计时器重新加载
- 如何获取新加载的图像's width / naturalWidth
- knocket将绑定应用于从ajax mvc contrib网格动态加载的html
- FuelUX数据网格未加载(使用示例)
- 列出并调用firefox扩展中新加载的选项卡中的js函数
- 图像网格不加载图像(Ionic + AngularJS)
- 旋转器重新加载图像似乎在覆盖层后面
- AJAX调用后,新加载的CSS选择器对jQuery.ech()不可用