在添加 VirtualVScroller 模块之前,Gridx 工作正常。然后只显示 "loading..."
Gridx works fine until VirtualVScroller module is added. Then only shows "loading..."
当我将 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();
}
);
好的,经过数小时的测试和调试后,我想知道我的代码是否在 fiddle 上运行,但不是在我自己的环境中。问题是自定义 gridx 样式表,它显然有一些错误。上面的代码是正确的,我现在必须处理 css 文件。
当我将 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();
}
);
好的,经过数小时的测试和调试后,我想知道我的代码是否在 fiddle 上运行,但不是在我自己的环境中。问题是自定义 gridx 样式表,它显然有一些错误。上面的代码是正确的,我现在必须处理 css 文件。