然后我的赋值js是:
function onButtonEdit(e) {
var btnEdit1 = e.sender;
mini.open({url: "/web/Storage/Goods/GoodsList.aspx",title: "请选择数据!", width: 800,
height: 450,
ondestroy: function (action) {if (action == "ok") {
var iframe = this.getIFrameEl();
var data = iframe.contentWindow.returnValue;
var row = grid.getSelected();
for (var i = 0; i < data.length; i++) {
var newrow = {GID:data[i].GID,Name:data[i].Name,Model:data[i].Model,Unit:data[i].Unit}
if (i == 0)
grid.updateRow(row, newrow);
else
grid.addRow(newrow, grid.indexOf(row));
}
}
}
});
}