Ticket T164532
Visible to All Users

Automatically refresh view

created 10 years ago

Hi, is there a way to refresh a view f.e. every 20 seconds?

Answers approved by DevExpress Support

created 10 years ago

Hello,

Sure, you can implement this task using the standard approaches on a timer.
XAF's API you need to call to refresh data within a certain View is View.ObjectSpace.Refresh, where View is the view you want to refresh.
There are countless examples you can locate in our database using our search engine: https://search.devexpress.com/?q=refresh&p=T4%7cP2%7c54&d=15
I hope you find this information helpful.

    Comments (2)

      Hi Dennis
      It seems to me you have quoted this search term a lot of times because I keep going in circles trying to find an example.  Instead I find more links to the same search term.
      It would be great if you had a definitive example in the user documentation and just linked to that.
      Kirsten

      Dennis Garavsky (DevExpress) 10 years ago

        Hi Kirsten,

        This task consists of the two main parts:

        1. Triggering actions periodically.
          This part is not specific to XAF, and you can use various standard .NET Framework solutions for this.  For instance, you could use a Timer class. Refer to MSDN for more details.

        2. Calling the XAF API that refreshes data.
          This part is specific to XAF and is a call of a single method I described above.
          In any event, we will consider creating a WinForms example for this (there is already an example for Web: KA18958).

        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.