- 注册时间
- 2013-8-12
- 最后登录
- 2015-8-13
- 阅读权限
- 10
- 积分
- 237
- 精华
- 0
- 帖子
- 70
|
RE: 容器加载窗体
factory 发表于 2013-8-12 09:30
代码贴上来看看
现在不是这个问题 ,是直接单击窗体上的 X 关闭后,再打开窗体,窗体里的值就不在显示了,请问这是怎么回事。代码如下:
var detailGrid_Form = document.getElementById("dataGrid_Form");
DepEmployInfo.onShowRowDetail = function (e) {
//获取Datagrid对象
var grid = e.sender;
//获取父节点的行对象
var row = e.record;
//获取行详细对象
var td = grid.getRowDetailCellEl(row);
td.appendChild(detailGrid_Form);
detailGrid_Form.style.display = "block";
//表单加载员工信息
var form = new mini.Form("dataGrid_Form");
if (grid.isNewRow(row)) {
form.reset();
} else {
grid.loading();
var id = row.employID;
$.ajax({
type: "post",
url: "/DepInfo/YuangInfo?employID=" + id,
success: function (data) {
debugger;
var ShowemployInfo = mini.decode(data);
form.setData(ShowemployInfo[0]);
grid.unmask();
}
});
}
} |
|