- 注册时间
- 2013-7-24
- 最后登录
- 2015-11-15
- 阅读权限
- 10
- 积分
- 138
- 精华
- 0
- 帖子
- 24
|
也是进行了删除操作,在ajax回调里reload
function delModel() {
var rows = grid.getSelecteds();
if (rows.length >= 1) {
if (confirm("确定要删除这" + rows.length + "个模型?")) {
for (var i = 0; i < rows.length; i++) {
rows[i]._state = "deleted";
}
var json = mini.encode(rows);
$.ajax({
url: "/APS_PlanOptimization/CompanyModelAnalysis/DelModel",
type: 'post',
data: { data: json },
cache: false,
success: function (text) {
if (text != "") {
alert(text);
} else {
alert("OK!");
}
grid.reload();
},
error: function () {
alert("Error!");
}
});
}
} else {
alert("请至少选中一条数据");
}
} |
|