jqgrid addRowData在grid里没有其他行时可以正确添加,有行时则不能添加,但是确实执行成功了。
[code="java"]
alert("这是保存新的行");
var dataRow = {
guid:data.expertiseVo.guid,
typeName:data.expertiseVo.typeName,
expertiseName:data.expertiseVo.expertiseName,
expertiseNo:data.expertiseVo.expertiseNo,
requiredLvl:data.expertiseVo.requiredLvl,
materialId1:data.expertiseVo.materialId1,
materialCnt1:data.expertiseVo.materialCnt1,
materialId2:data.expertiseVo.materialId2,
materialCnt2:data.expertiseVo.materialCnt2,
materialId3:data.expertiseVo.materialId3,
materialCnt3:data.expertiseVo.materialCnt3,
materialId4:data.expertiseVo.materialId4,
materialCnt4:data.expertiseVo.materialCnt4,
materialId5:data.expertiseVo.materialId5,
materialCnt5:data.expertiseVo.materialCnt5,
materialId6:data.expertiseVo.materialId6,
materialCnt6:data.expertiseVo.materialCnt6,
productId:data.expertiseVo.productId,
cd:data.expertiseVo.cd,
description:data.expertiseVo.description
}
expertiseGrid.addRowData(data.expertiseVo.guid,dataRow,last);
alert("添加新行结束");
[/code]
是ACTION返回的JSON数据。