我需要在纠正错误后关闭Kendo网格弹出窗口 .
第一:
我找了一种方法来阻止Kendo弹出窗口在出现错误时关闭 . 我在StackOverflow中找到了答案
Prevent Kendo grid popup edit from closing on Error
但是,在纠正显示的错误后,我单击“保存”, it does not work .
that is, it does not save nor close the kendo popup
如何在纠正错误后启用保存操作:
我的代码:
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();
}
}