easyui右键事件谈
2016-01-21 16:42
429 查看
<div id="menu" class="easyui-menu" style="width: 20px; display: none;">
<div id="btn_Download" data-options="iconCls:'icon-edit'"><evun:msg key="probe.jsp.dtciclaimingordersw.title.rightclickdownload"/></div>
</div>
$("#detail_dtciclaimingattachsw_grid").datagrid({
onRowContextMenu: function (e, rowIndex, rowData) { //右键时触发事件
e.preventDefault(); //阻止浏览器捕获右键事件
$(this).datagrid("clearSelections"); //取消所有选中项
$(this).datagrid("selectRow", rowIndex); //根据索引选中该行
$('#menu').menu('show', {//显示右键菜单
left: e.pageX,
top: e.pageY,
onClick: function(item){
if(item.id=='btn_Download'){
for(var i=0;i<=rowIndex;i++){
alert(item.text+" :"+rowData.ATTACHMENT_NAME);
}
}
}
});
e.preventDefault();//阻止浏览器自带的右键菜单弹出
}
});
probe.jsp.dtciclaimingordersw.title.rightclickdownload=Download
<div id="btn_Download" data-options="iconCls:'icon-edit'"><evun:msg key="probe.jsp.dtciclaimingordersw.title.rightclickdownload"/></div>
</div>
$("#detail_dtciclaimingattachsw_grid").datagrid({
onRowContextMenu: function (e, rowIndex, rowData) { //右键时触发事件
e.preventDefault(); //阻止浏览器捕获右键事件
$(this).datagrid("clearSelections"); //取消所有选中项
$(this).datagrid("selectRow", rowIndex); //根据索引选中该行
$('#menu').menu('show', {//显示右键菜单
left: e.pageX,
top: e.pageY,
onClick: function(item){
if(item.id=='btn_Download'){
for(var i=0;i<=rowIndex;i++){
alert(item.text+" :"+rowData.ATTACHMENT_NAME);
}
}
}
});
e.preventDefault();//阻止浏览器自带的右键菜单弹出
}
});
probe.jsp.dtciclaimingordersw.title.rightclickdownload=Download
相关文章推荐
- DbExpressionBinding requires an input expression with a collection ResultType. 参数名: input
- requirejs的用法
- 用UIColloctionView 实现cell放大以及无限轮播
- UIImageView 的contentMode属性应用
- <c:set var="ctx" value="${pageContext.request.contextPath}" />的学习
- 303. Range Sum Query - Immutable
- php中$_request与$_post、$_get的区别
- Query获取值常用
- UVA - 10689 Yet another Number Sequence 矩阵快速幂
- break and continue
- value
- Multiple Return Values
- extjs做判断items:[{ xtype:'textfield', fieldLabel:'登录帐号', value: name, }] 已经得到了value的值
- easyui combotree 只选中叶子
- UINavigationControllerDelegate的方法
- iOS8中提示框的使用UIAlertController(UIAlertView和UIActionSheet二合一)(朕已经测试过了,是ok的,转来自己看看)--警告框
- UIAlertController 标题文字大小 颜色
- android 根据控件的ID字符串利用反射获取UI控件
- Leetcode--Permutation Sequence
- iOS开发-UITextView根据内容自适应高度