`
jilong-liang
  • 浏览: 471210 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类

ExtJS右击菜单事件

阅读更多
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())
 

 

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics