Extjs右击事件 写道 rowcontextmenu:function(grid,rowIndex,e){//右键菜单 e.preventDefault();document.title=(rowIndex) //这里的index是每次点击的行 if(menu==null){//为了节省资源,只创建一次 menu=new Ext.menu.Menu({ items:[{ text:msg.add,iconCls:"icon icon_add", handler:showadd },{ text:msg.edit,iconCls:"icon icon_edit", handler:function(){document.title+=","+(rowIndex)//但是这里的index却始终是第一次点击的行,这是怎么回事啊,谁给解释下? //到底要怎样才能在第二次点击时获取当然右键的行? showedit(grid.getStore().getAt(rowIndex)); } },{ text:msg.del,iconCls:"icon icon_del", handler:function(){ showdel(grid.getStore().getRange(rowIndex,rowIndex)) } }] }); }; menu.swAt(e.getPoint())