大家好,
关于剑道网格requestEnd如果我打电话 kendo notification 可以吗?什么时候更新记录成功?
在 this Demo我尝试实现它,但不知怎的,在我更新以记录它之后,它保持缓冲并且不显示通知。
有人可以帮我解决这个问题吗? 预先感谢您!
我包含该函数以防万一:
function KendoAlert(content) {
$("<div></div>").kendoAlert({
title: "Messages!",
content: content
}).data("kendoAlert").open();
}
function KendoNotify(message) {
notification.show({
message: message
}, "upload-success");
}
function onRequestEnd(e) {
debugger;
if (e.type == "update" && !e.response.Errors) {
KendoNotify("Update Done!");
//KendoAlert("Update Done!");
}
}
最佳答案
问题是您在 $(document).ready
中指定了变量 notification
。函数完成后,变量通知
就会丢失(有关变量范围的更多信息,请阅读 https://stackoverflow.com/a/500459/4944034)
我对您的示例进行了微小的更改并收到了通知:
var notification;
$(document).ready(function () {
notification = $("#notification").kendoNotification({
关于javascript - Kendo UI - 在 requestEnd 中显示通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54210497/