刷新Dojo Datagrid [英] Refresh Dojo Datagrid
问题描述
//为我的datagrid存储
var myStore = new dojo.data.ItemFileWriteStore({url:'/my/store.html',clearOnClose:true,urlPreventCache:true});
当我进行ajax调用来保存/更新网格数据时,在回调函数的ajax电话我打电话:
function myCallBack()
{
myStore.close ();
警报(数据保存成功);
}
更新Grid中记录的功能,调用 myStore.save ()。
这种情况在FireFox中工作正常,但网格在IE8中没有刷新
任何指针或帮助都非常感激
确定我找到了解决方案。您首先需要关闭网格上的商店:
myGrid.myStore.close();
然后使用新数据将商店设置回网格:
myGrid.setStore(newStoreData);
有关详细信息,请按照此
So I am trying to refresh a Datagrid when stores data changes.
//Store for my datagrid
var myStore= new dojo.data.ItemFileWriteStore({ url : '/my/store.html', clearOnClose:true, urlPreventCache:true } );
When I make an ajax call to save/update data for the grid, in callback function of ajax call I call:
function myCallBack()
{
myStore.close();
Alert("Data Saved Successfully");
}
The function that updates the records in Grid, calls myStore.save() right before exiting. This scenario works fine in FireFox but grid is not refreshing in IE8
Any pointers or help is much appreciated.
Ok I found the solution. You first need to close the store on your grid:
myGrid.myStore.close();
Then set the store back to the grid with new data:
myGrid.setStore(newStoreData);
For more information, follow this
这篇关于刷新Dojo Datagrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!