I need to automatically refresh a list view in the web app every 60 seconds or so. I used much of the code posted by Konstantin at the very end of http://www.devexpress.com/Support/Center/p/B220604.aspx because I wanted this to be done using partial postbacks.
I had to make some changes because it wasn't working 100% for me - the timer would sometimes continue ticking and keep causing the partial postbacks even when I've navigated to a DetailView. In addition to the snippet
C#protected override void OnDeactivated() {
WebWindow.CurrentRequestWindow.RegisterClientScript("DisableTimer", "window.timer.Stop();");
base.OnDeactivated();
}
I also tried adding timer.SetEnabled(false), setting the timer's server-side enabled property to false, removing the timer for the update panel, but this would still continue. In the end, I added a new DetailViewController which, on activation, set's the timer's client-side callback handler to just function(s,e){}. This worked.
However, the issue I have now is that when the timer is correctly refreshing the ListView, if the ListView has an open popup and a refresh happens, the popup goes away along with data entered in the popup.
Is there a way to stop the timer when a popup occurs in the web app, or is there an otherwise better way to automatically refresh the ListView?
Thank you for contacting us. We will need additional time to research this problem. We will post an answer as soon as we can.