Gridx正常工作,直到添加VirtualVScroller模块。然后只显示" loading ..."

时间:2015-09-03 14:23:02

标签: javascript dojo dojo.gridx gridx

当我添加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();


    }
);

1 个答案:

答案 0 :(得分:0)

好的,经过数小时的测试和调试后,我想知道我的代码正在处理小提琴,但不是在我自己的环境中。问题是自定义gridx样式表,显然有一些错误。上面的代码是正确的,我现在必须处理css文件。