Force refresh calendar view with new external data |
Post Reply |
Author | |||
reinaldo
Newbie Joined: 13 January 2011 Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 01 April 2017 at 11:45am |
||
Hello;
How can I force a refresh of the current calendar view if data has been externally modified? Let's say I go and manually make changes to the table holding calendar events while the calendar is open on another workstation. I have ways to alert the app about the need to re-read data and refresh via a database notification. That part is not the problem. My question is, once the app receives the notification and thus it is aware that it needs to display new data, how can I tell the calendar control to re-read events from the data source and re-draw the calendar with the new externally modified data? So far I've been trying with oCal:Populate() followed by oCal:RedrawContorl(), but that doesn't do anything. Please help. Thank you, Reinaldo.
|
|||
reinaldo
Newbie Joined: 13 January 2011 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
||
I figure it out. In case it helps others here is the answer. First you need to find the event from the events collection for the given day:
Now you need to find the particular event that was changed by looping through the events list while comparing some field that you know is unique. Once you find the event it needs to be changed on the calendar control:
Or removed if the event was deleted:
I hope that helps others in the future. |
|||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |