DOJO 的新手..使用 JsonRest 从数据库中获取数据...我已经给出了显示 50000 中的 0-1000 的范围...但它显示的是完整数据...要求是当加载 1000 时滚动下一个请求到服务器,其余数据将显示....请帮助我尝试了很多......
我的代码
myStore = dojo.store.Cache(dojo.store.JsonRest({
target : "myip7080/GridExample/string"
}), dojo.store.Memory());
myStore.query({
start: 0,
count: 1000
}).then(function(results){
alert(results);
});
grid = new dojox.grid.DataGrid({
store : dataStore = dojo.data.ObjectStore({
objectStore : myStore
}),
structure : [ {
name : "SNO",
field : "sno",
width : "100px",
editable : true
}, {
name : "SNAME",
field : "sname",
width : "100px",
editable : true
}, {
name : "SALARY",
field : "salary",
width : "200px",
editable : true
} ]
}, "target-node-id"); // make sure you have a target HTML element with this id
grid.startup();
dojo.query("#save").onclick(function() {
dataStore.save();
});
});