0
當我將Gridx模塊「VirtualVScroller」添加到我的網格時,只顯示「加載...」並且沒有數據。沒有模塊,一切正常。我已經嘗試刪除所有其他模塊,但這也沒有幫助。 任何想法我下面的代碼?:Gridx工作正常,直到添加VirtualVScroller模塊。然後只顯示「加載...」
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();
}
);