当我将Gridx模块"VirtualVScroller"添加到我的网格时,只有"loading…"而没有显示数据。没有这个模块,一切都很好。我已经尝试删除所有其他模块,但这也没有帮助。对我下面的代码有什么想法吗?:
require([
"gridx/Grid",
"gridx/core/model/cache/Sync",
"dojo/store/Memory",
"gridx/modules/CellWidget",
"gridx/modules/Bar",
"gridx/modules/Filter",
"gridx/modules/filter/QuickFilter",
"gridx/modules/ColumnResizer",
"gridx/modules/SingleSort",
"gridx/modules/VirtualVScroller",
"gridx/modules/ColumnWidth",
"gridx/modules/HScroller",
"dijit/form/Button",
"dojo/domReady!"
], function(Grid, Cache, Memory,CellWidget,Bar,Filter, QuickFilter, ColumnResizer,SingleSort,VirtualVScroller,ColumnWidth,HScroller,Button){
var myButton = new Button({
label: "new",
onClick: function(){
window.location.href = url;
}
});
var store = new Memory({
idProperty:"itemID",
data: datajson
});
var grid = new Grid({
id:"gridId",
store: store,
cacheClass: Cache,
structure: structurejson,
autoWidth: true,
barTop: [
[{plugin: myButton}],
[{pluginClass: "gridx/support/QuickFilter", style: "text-align: right;"}]
],
modules: [
"gridx/modules/VirtualVScroller",
"gridx/modules/CellWidget",
"gridx/modules/Bar",
"gridx/modules/select/Row",
"gridx/modules/select/Cell",
"gridx/modules/Filter",
"gridx/modules/ColumnResizer",
"gridx/modules/SingleSort",
"gridx/modules/ColumnWidth",
"gridx/modules/HScroller"
]
});
grid.placeAt("content");
grid.startup();
}
);
好了,经过几个小时的测试和调试,我想知道我的代码是正常工作的,但不是在我自己的环境中。问题是一个自定义网格样式表,它显然有一些错误。上面的代码是正确的,现在我要处理css文件