Opened 9 years ago

Closed 9 years ago

#11579 closed defect (fixed)

Dojo EnhancedGrid Indirect Selection+Context Menu

Reported by: rmasse Owned by: evan
Priority: high Milestone: 1.6
Component: DojoX Grid Version: 1.5
Keywords: EnhancedGrid context menu Cc:
Blocked By: Blocking:

Description (last modified by Adam Peller)

When selecting multiple rows via the indirect selection method, you cannot create a context menu to appear on right click.

Useful application would be to select multiple rows and have a context menu appear to delete selected. Not sure if this is a defect or enhancement as the selectedRegionMenu is undocumented and may or may not be designed to support this behavior.

The above can be reproduced either via the live context menu example on http://www.dojotoolkit.org/reference-guide/dojox/grid/EnhancedGrid.html#dojox-grid-enhancedgrid

or with my code below.

code snipet:

            var headerMenu = new dijit.Menu({});
            
			headerMenu.addChild(new dijit.MenuItem({
                label: "Hide Column",
                iconClass: "dijitEditorIcon dijitEditorIconCut",
                onClick: function() {}
            }));

            var rowMenu = new dijit.Menu({});
            
			rowMenu.addChild(new dijit.MenuItem({
                label: "Remove Row",
                iconClass: "dijitEditorIcon dijitEditorIconCut",
                onClick: function() {}
            }));

            var srMenu = new dijit.Menu({});
            
			srMenu.addChild(new dijit.MenuItem({
                label: "Remove Selected Row(s)",
                iconClass: "dijitEditorIcon dijitEditorIconCut",
                onClick: function() {}
            }));

            var gridReport=new dojox.grid.EnhancedGrid({
            	id: "gridData",
            	plugins: {dnd: true, indirectSelection: true, menus: {headerMenu: headerMenu, rowMenu: rowMenu, selectedRegionMenu: srMenu}},  // Each required feature must be turned on
                query: {},
                store: reportStore,
                clientSort: true,
                rowSelector: "0px",
                structure: layoutReport
            },
            document.createElement('div'));
            dojo.byId("reportGrid").appendChild(gridReport.domNode);
            gridReport.startup();

Change History (5)

comment:1 Changed 9 years ago by Adam Peller

Owner: changed from bryanforbes to evan

comment:2 Changed 9 years ago by Adam Peller

Description: modified (diff)

comment:3 Changed 9 years ago by bill

Owner: changed from evan to Evan

comment:4 Changed 9 years ago by bill

Owner: changed from Evan to evan

comment:5 Changed 9 years ago by evan

Milestone: tbd1.6
Resolution: fixed
Status: newclosed

Fixed with [23419] of #12094

Note: See TracTickets for help on using tickets.