Javascript 剑道UI-在requestEnd中显示通知
欢迎大家, 在剑道网格上,如果我在成功更新记录时调用,是否可能 在中,我尝试实现它,但不知怎的,在我更新记录后,它保持缓冲,而不显示通知 有人能帮我解决这个问题吗? 提前谢谢你 我包括该功能,以防:Javascript 剑道UI-在requestEnd中显示通知,javascript,kendo-ui,kendo-grid,Javascript,Kendo Ui,Kendo Grid,欢迎大家, 在剑道网格上,如果我在成功更新记录时调用,是否可能 在中,我尝试实现它,但不知怎的,在我更新记录后,它保持缓冲,而不显示通知 有人能帮我解决这个问题吗? 提前谢谢你 我包括该功能,以防: function KendoAlert(content) { $("<div></div>").kendoAlert({ title: "Messages!", content: content }).data("kendoAlert").open()
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内指定变量通知。函数完成后,将丢失变量通知,以获取有关变量范围的更多信息 我对您的示例做了一个小更改,并收到一个通知:
哎哟我没想到会这样。谢谢你通知我这件事,我会记下来的。别忘了:如果这是正确或有用的解决方案,你可以接受这个答案。阅读更多关于在上接受答案的信息
var notification;
$(document).ready(function () {
notification = $("#notification").kendoNotification({