1

I'm having issues with Gridx while using IndirectSlect and below is my code

<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>

When I run my code, in IE&Firefox console, I see an error message as shown below. Basically, two modules are not found while gridx creation.

The 1-th declared module can NOT be found, please require it before using it: gridx/modules/IndirectSelect


The 2-th declared module can NOT be found, please require it before using it: gridx/modules/RowHeader

Please help.

Regards, Manju

bajji
  • 1,271
  • 3
  • 15
  • 37

1 Answers1

0

You have to define the modules in the file that you use the grid.

enter image description here

And then you call it in the grid declaration.

var grid = new Grid({modules: [indirectSelect, RowHeader]})
Stefano
  • 293
  • 1
  • 4
  • 22
  • Well, I think, this is true when you want to create gridx programmatically. Here I'm trying to create gridx through templated widget approach. I have some gridx's created the way you said and they work fine. – bajji Apr 07 '17 at 19:10
  • @ManjunathaMuniyappa Have you required those modules also in your widget module or they are specified only in template? – barbsan Apr 10 '17 at 06:15
  • @barbsan, I don't have them declared within my widget just only in a template. – bajji Apr 10 '17 at 16:14
  • I also tried doing something like this but no luck gridx.modules.push({ "moduleClass":'gridx/modules/select/Row', "multiple":"Multiple", "selectByIndex":true, "triggerOnCell":true }, { "moduleClass":'gridx/modules/IndirectSelect', "all":true }); – bajji Apr 10 '17 at 16:21
  • Ok now, I included all modules as suggested by @Stefano I can see checkboxes expect a checkbox on the header(where users can select all items) – bajji Apr 10 '17 at 20:17
  • I don't know why because I have the checkbox on the header to select all items. – Stefano Apr 11 '17 at 08:28