Hi, is there a way to refresh a view f.e. every 20 seconds?
Automatically refresh view
Answers approved by DevExpress Support
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.
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
Hi Kirsten,
This task consists of the two main parts:
-
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. -
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).