带有JSONREST问题的Dojo增强型网格

我正在尝试使用Dojo JSONREST的增强网格,我遇到了一些问题.
我一直在寻找一些例子,但无法弄清楚如何做我需要的.

在下面的代码中,我的休息服务有两个参数,并且服务上的查询有效.
问题是,当调用grid.startup()时,它似乎再次调用Rest服务,因为没有传递参数,其余服务都会丢失.我在这做错了什么?

还有什么方法可以更新到商店,以便只包含查询结果?,这样当网格出现时它只包含这些值?

感谢任何帮助或指针..

ready(function(){

  var grid;

  var store = new JsonRest({
              target: "rest/search"
              });   

  store.query({term: "test",category: "category"},{
        start: 10,count: 10,}).then(function(data){

      // how do i update store with queried results?

      });

  dataStore = new ObjectStore({ objectStore: store });

  /*set up layout*/
  var layout = [[
   {'name': 'Name','field': 'col1',noresize: true,'width': '100%'},]];

  /*create a new grid:*/
  grid = new EnhancedGrid({
      id: 'grid',store: dataStore,structure: layout,selectable: true,selector: false,selectionMode: 'none',escapeHTMLInData: false,autoHeight:true
  },document.createElement('div'));

grid.startup();
}

解决方法

您是否尝试过设置网格的查询参数? A link to the docs. And a link to an example.

通过查看问题中的代码,网格似乎应该显示数据块/页面 – an example using the pagination plugin for the grid.

您可能也对The filter plugin感兴趣.

相关文章

我有一个网格,可以根据更大的树结构编辑小块数据.为了更容易...
我即将开始开发一款教育性的视频游戏.我已经决定以一种我可以...
我正在使用带有Grails2.3.9的Dojo1.9.DojoNumberTextBox小部...
1.引言鉴于个人需求的转变,本系列将记录自学arcgisapiforja...
我正在阅读使用dojo’sdeclare进行类创建的语法.描述令人困惑...
我的团队由更多的java人员和JavaScript经验丰富组成.我知道这...