Ticket Q292173
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

How to automatically refresh data in a View after a certain period of time on the Web

How to auto refresh a listview?

created 14 years ago

How can I best refresh a listview on a timely basis (automatically). I had a look at issue Q262250 which is a great help, but I keep getting the following error:
"Besturingselement RefreshTransportRequestsTimer van het type ASPxTimer moet binnen een form-label worden geplaatst met runat=server.".
What am I missing?
Thanks on beforehand.

Answers approved by DevExpress Support

created 14 years ago (modified 11 years ago)

Hi Ad,
Thank you for posting your code snippet. It looks like you need to add the ASPxTimer control to the Page.Form.Controls collection, to resolve this problem:

C#
void Frame_TemplateChanged(object sender, EventArgs e) { if (Frame.Template == null) return; Page p = (Page)Frame.Template; if (p.FindControl("RefreshTransportRequestsTimer") != null) return; DevExpress.Web.ASPxTimer.ASPxTimer timer = new DevExpress.Web.ASPxTimer.ASPxTimer(); timer.ID = "RefreshTransportRequestsTimer"; timer.Tick += new EventHandler(timer_Tick); timer.Interval = 10000; timer.Enabled = true; p.Form.Controls.Add(timer); }

Please update your code accordingly, and let me know whether this helps.
Thanks,
Alex

    Show previous comments (3)
    Dennis Garavsky (DevExpress) 11 years ago

      @Ignas: We will be more than happy to research your project and help you avoid this error. Please create a separate ticket in the Support Center and post your problematic project there. Thanks!

        Where can I find a winforms example like this?

        Dennis Garavsky (DevExpress) 10 years ago

          @Kirsten: While we do not have a ready WinForms example for this particular scenario, I elaborated more on how to implement this at T164532.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.