在纠正出现的错误后,我需要关闭Kendo网格弹出窗口。
第一:
我正在寻找一种方法来防止出现错误时关闭Kendo弹出窗口。 我在StackOverflow中找到了答案
Prevent Kendo grid popup edit from closing on Error
但是,在纠正出现的错误之后,我单击“保存”,它不起作用。
也就是说,它不会保存或关闭剑道弹出窗口
在纠正出现的错误后如何启用保存操作:
我的代码:
function error_handler(e) {
if (e.errors) {
var message = "";
var grid = $("#grid").data("kendoGrid");
$.each(e.errors, function (key, value) {
if ('errors' in value) {
$.each(value.errors, function () {
message += this + "\n";
});
}
});
displayNotificationResult(message, "error");
grid.one("dataBinding", function (e) {
e.preventDefault();
});
grid.cancelChanges();
}
}