2017-04-06 32 views
1

我遇到的gridx問題,同時使用IndirectSlect以下是我的代碼的gridx模塊未定義的錯誤而載入

<div data-dojo-type="dijit.layout.ContentPane" data-dojo-attach-point="metadataGrid" data-dojo-props="region:'left'"> 
    <div id="updateMetadataManagerGrid" data-dojo-attach-point="updateMetadataManagerGrid" data-dojo-type="gridx.Grid" 
    data-dojo-props="cacheClass: 'gridx/core/model/cache/Sync',barTop: [ 
       { content: '<h3>Document Update Requests</h3>', style: 'color: blue;' }, 
       {pluginClass: 'gridx/support/QuickFilter', style: 'text-align: right;'} 
      ],modules: [ 
       'gridx/modules/IndirectSelect', 
       'gridx/modules/RowHeader', 
       'gridx/modules/Pagination', 
       'gridx/modules/pagination/PaginationBar', 
       'gridx/modules/SingleSort', 
       'gridx/modules/Filter', 
       'gridx/modules/filter/FilterBar', 
       'gridx/modules/extendedSelect/Row', 
       'gridx/modules/VirtualVScroller', 
       'gridx/modules/extendedSelect/Row', 
       'gridx/modules/Focus', 
       'gridx/modules/move/Row', 
       'gridx/modules/CellWidget', 
       'gridx/modules/Edit', 
       'gridx/modules/ColumnResizer', 
      ]",selectRowTriggerOnCell: true,> 

    </div> 
    </div> 

當我運行我的代碼,在IE火狐&控制檯,我看到一個錯誤信息,如圖下面。基本上,gridx創建時找不到兩個模塊。

的1個聲明模塊無法找到,請使用前需要它:爲gridx /模塊/ IndirectSelect


的2個聲明模塊無法找到,請使用前需要它:gridx/modules/RowHeader

請幫忙。

問候, 饅頭

回答

0

您有您使用網格文件中定義的模塊。

enter image description here

然後調用它在網格中聲明。

var grid = new Grid({modules: [indirectSelect, RowHeader]}) 
+0

嗯,我想,這是真的,當你想以編程方式創建gridx。在這裏,我試圖通過模板化小部件方法創建gridx。我有一些gridx創建你說的方式,他們工作正常。 –

+0

@ManjunathaMuniyappa你是否還需要這些模塊在你的widget模塊中,或者它們只在模板中指定? – barbsan

+0

@barbsan,我沒有在我的小部件中僅在模板中聲明它們。 –

相關問題