PDA

View Full Version : Ext 3.3.2 GridPanel Event "rowcontextmenu" lost event



hschaefer123
27 Apr 2011, 4:49 AM
Hi Folks,
using contextmenu inside gridpanel via

this.on('contextmenu', this.onContextMenu, this);
...
onContextMenu : function(e)

works as expected but using

this.on('rowcontextmenu', this.onContextMenu, this);
...
onContextMenu : function(grid, rowIndex, e)

does not work as expected!?!
The rowIndex is a object instead of a number
The e (event) is not a browser event where i can use e.stopEvent().

I would like to attach a row context menu that depends on current/selected row and i thought this is the right way.

Best wishes,
Holger

mitchellsimoens
27 Apr 2011, 7:02 AM
This is working on the Array Grid example using 3.3.2:


grid.on('rowcontextmenu', function(me, rowIndex, e) {
console.log(me); //is Ext.grid.GridPanel instance
console.log(rowIndex); //is number
console.log(e); //is Ext.EventObject instance
});

hschaefer123
3 May 2011, 1:28 AM
Hi Mitchell,
i figured out my problem.

I attached a method called this.onContextMenu, but the same method is used inside grid but with different params.

Thankx for your help.

Cheers Holger