Ajax 更新DojoDataGrid
我需要在我的网站上显示一个数据网格。当用户登录到该网站时,会发送一个ajax请求以获取网格的全部数据。之后,单元更新将从DojoAjax请求发送到服务器(json响应)。因此,如何仅在数据网格中自动更新这些单元格。要更新数据网格存储中的项目:Ajax 更新DojoDataGrid,ajax,datagrid,dojo,Ajax,Datagrid,Dojo,我需要在我的网站上显示一个数据网格。当用户登录到该网站时,会发送一个ajax请求以获取网格的全部数据。之后,单元更新将从DojoAjax请求发送到服务器(json响应)。因此,如何仅在数据网格中自动更新这些单元格。要更新数据网格存储中的项目: grid.store.fetch({query:{/*find items to update*/}, onItem : function(gridItem){ grid.store.setValue(gridItem, attr, valu
grid.store.fetch({query:{/*find items to update*/},
onItem : function(gridItem){
grid.store.setValue(gridItem, attr, value);
});
grid.store.save();
从xhr响应中将要更新的属性设置为适当的值。要更新datagrid存储中的项,请执行以下操作:
grid.store.fetch({query:{/*find items to update*/},
onItem : function(gridItem){
grid.store.setValue(gridItem, attr, value);
});
grid.store.save();
将要更新的属性设置为xhr响应中的适当值