- 注册时间
- 2014-4-8
- 最后登录
- 2015-7-9
- 阅读权限
- 10
- 积分
- 221
- 精华
- 0
- 帖子
- 63
|
dforce 发表于 2015-1-16 16:33
那只能你那边简化页面慢慢找了
我发现规律了,主界面中有grid,弹跳页中向主页面中添加一条记录,然后 再在弹跳也中修改grid的新添加的记录,当grid调用updateRow的时候, 就会报错了,是不是因为grid被释放的原因呢??
mini.open({
url: "WfFlowStep.aspx?Type=" + Type + "&mouldId=" + MouldID + "&StepFID=" + StepFID + "&Operate=" + Operate + "&FlowId=" + $("#FlowId").val(),
title: stepName, width: 1100, height: 900,
onload: function() {
},
ondestroy: function(action) {
var iframe = this.getIFrameEl();
var data = iframe.contentWindow.NewStepObj;
if (action == "ok") {
var grid1 = mini.get("datagridStepMsg");
var FID = getFID('saStep');
data.TableName = $("#TableName").val();
data.FID = FID;
var newRow = { StepName: data.StepName, StepNote: data.StepNote, StepTypeID: data.stepTypeID, StepTypeName: data.stepTypeName, FID: FID, Data: data }; //,where:data.data
var length = grid1.data.length;
grid1.addRow(newRow, length);
grid1.deselectAll();
grid1.select(newRow);
} else if (action == "update") {
var grid = mini.get("datagridStepMsg");
var selectRow = grid.getSelected();
var updateRow = { Data: null }; //,where:data.data
grid.updateRow(selectRow, updateRow);
var updateRow = { StepName: data.StepName, StepNote: data.StepNote, Data: data }; //,where:data.data
grid.updateRow(selectRow, updateRow);
grid.deselectAll();
grid.select(updateRow);
}
}
}); |
|