easyUI双击事件,完整总结

我上一篇双击总结文章,然后这是另一种实现方法
/ 双击事件
var showSelectedSurveryDataOnMap=function(rowIndex,currentRow){
// console.info(rowData);
$('#title').text(currentRow.title);
$('#corpName').text(currentRow.corpName);
$('#createTime').text(currentRow.createTime);
$('#nr').html(currentRow.dutyContent);
   $("#content").show().dialog({
                    fit:"true",    
                    modal:true ,
                    showType:'show',
                    cache:false,
                    collapsible:false,
                    title:'查看内容',
                    minimizable:false,
                    maximizable:true,
                    closable:false,
                    draggable:false,
                    buttons:[{
                        text:"关闭",
                        iconCls:'icon-no',
                        handler:function(){
                            $('#content').dialog('close');
                         //   window.location.reload();//刷新当前页面.
			return;
                        }
                    }]
                });


}

这种实现效果是



然后此时遇到一个BUG 就是双击行时候,一直显示的 是第一条数据,我重新翻了翻demo然后重新做了一个方法

<div id="Dcontent" class="easyui-dialog" title="查看内容"  style="display: none" closed="true" data-options=" fit:'true',closable:'false'">

引入一个 dialog 默认是关闭的状态,然后在 双击事件里面加入行元素的field大功搞成,

 onDblClickRow :function(rowIndex){ 
  				var currentRow =$("#MessPubList").datagrid("getSelected");
            	$('#Dcontent').dialog('open');
            	$('#title').text(currentRow.title);
				$('#createTime').text(currentRow.createTime);
				$('#nr').html(currentRow.messContent);
  				},


留念,有需要的朋友可以参考一下,共同进步。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值