KendoUI 窗口闪烁旧内容 [英] KendoUI Window Flashes Old Content
本文介绍了KendoUI 窗口闪烁旧内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用 KendoUI 显示弹出窗口时,我注意到如果我通过调用 refresh
重用现有窗口,它会短暂显示旧内容,直到 AJAX 请求完成.
Using KendoUI to display a popup window, I've noticed that if I reuse an existing window by calling refresh
it briefly displays the old content until the AJAX request completes.
我的代码:
function clickHandler(evt) {
evt.preventDefault();
var dta=this.dataItem($(evt.currentTarget).closest("tr"));
convertWindow.refresh({ type: "GET", url: "CallMeConvert?AppointmentId="+dta.AppointmentId});
convertWindow.center();
convertWindow.open();
}
有什么办法可以防止这种情况发生,还是每次都必须销毁并重新创建窗口?
Is there any way to prevent this happening, or must I destroy and recreate the window every time?
推荐答案
最后,这很简单.您只需要在重置之前立即清除 HTML,如下所示:
It was, in the end, quite simple. You just need to clear the HTML immediately before doing the reset, like so:
$("#convert-window").html("");
convertWindow.refresh({ type:"GET", url:url }).center().open();
这篇关于KendoUI 窗口闪烁旧内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文