PDA

View Full Version : Problem with ContextMenu in Grid



Allekto
24 Sep 2009, 3:58 AM
Hi,

i've developed a Ext.Grid that shows some data. I then added a context menu that shows up when the user right-clicks on a row. Under Firefox This works pretty well.

But using Firefox under Mac oder Internet Explorer (6,7,8) under Windows the content of the Context Menu often doesn't get shown. It then looks like this:

http://www.allekto.de/images/image.png

This is strange. Here is my code for the grid listener:



var doRowCtxMenu = function(thisGrid, rowIndex, evtObj) {
evtObj.stopEvent();
var record = thisGrid.getStore().getAt(rowIndex);
thisGrid.rowCtxMenu = new Ext.menu.Menu({
items : [{
text : 'Bestand hinzubuchen',
icon : 'art/add.png',
handler : function() {
lagerbuchung(record, 1);
}
},{
text : 'Bestand abbuchen',
icon : 'art/delete.png',
handler : function() {
lagerbuchung(record, 2);
}
}, {
xtype: 'menuseparator'
}, {
text : 'Lagerbuchungen ansehen',
icon : 'art/information.png',
handler : function() {
showLagerbuchungen(record);
}
}]
});
thisGrid.rowCtxMenu.showAt(evtObj.getXY());
}


I also already tried to give the context menu a pre defined width and height. But it still doesn't help.

Can somebody please help? Thanks in advance

8 Oct 2009, 7:20 AM
Neat! That code looks very much like stuff that i've developed ;).

What version of ExtJS are you using?