Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ajax 更新DojoDataGrid_Ajax_Datagrid_Dojo - Fatal编程技术网

Ajax 更新DojoDataGrid

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

我需要在我的网站上显示一个数据网格。当用户登录到该网站时,会发送一个ajax请求以获取网格的全部数据。之后,单元更新将从DojoAjax请求发送到服务器(json响应)。因此,如何仅在数据网格中自动更新这些单元格。

要更新数据网格存储中的项目:

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响应中的适当值