When I add the Gridx module "VirtualVScroller" to my Grid, only "loading..." and no data is shown. Without the module everything works just fine. I already tried to remove all other modules, but this doesn't help either. Any ideas for my code below?:
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();
}
);
ok, after hours of testing and debugging I was wondering that my code was working on fiddle, but not in my own environment. The problem was a custom gridx stylesheet, which obviously had some error. The code above is correct, I will now have to take care of the css file.