- 注册时间
- 2012-10-29
- 最后登录
- 2013-6-23
- 阅读权限
- 10
- 积分
- 135
- 精华
- 0
- 帖子
- 33
|
factory 发表于 2013-4-10 11:01
可以的,你直接监听表格的cellclick事件
oncellclick="XXX"
没有用:
下面是我的代码;
jsp:
<div id="online" class="mini-datagrid" style="width:100%;height:280px;"
url='<cut value="${onlineVewUrl}" escapeXml="false"/>' idField="DEPTCODE" allowResize="true"
pageSize="20">
<div property="columns">
<div field="DEPTNAME" width="80" headerAlign="center" align="center" allowSort="true" oncellclick="show">部门名称</div>
<div field="COUNT" width="25" headerAlign="center" align="center" allowSort="true">人数</div>
<%--<div name="action" width="80" headerAlign="center" align="center" renderer="onActionRenderer"
cellStyle="padding:0;">操作
</div>--%>
</div>
</div>
js :
function show(e) {
if(e.fild=="DEPTNAME"){
var record = e.record;
var deptcode = record.DEPTCODE;
alert(deptcode);
if (row) {
var readyInfoUrl =
'<c:url value='alone.portal'><c:param name=".pen" value="${model.entity.name}"/><c:param name=".pmn" value="view"/><c:param name=".f" value="${portletWindow.id}"/><c:param name="action" value="showView"/></c:url>&deptcode='+deptcode;
mini.open({
url: readyInfoUrl,
title: "查看", width: 452, height: 335,
onload: function () {
var iframe = this.getIFrameEl();
var data = { action: "ready", id: row.NUM};
}/*,
ondestroy: function (action) {
yshgrid.reload();
}*/
});
}
}
} |
|