Calendar Deleting an event |
Post Reply |
Author | |||
PPL1
Groupie Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
Posted: 06 October 2008 at 5:44pm |
||
I'm using the Calendar in a VB6 app.
I want to be able to get a notice when an event is deleted and possibly cancel it. There is no Cancel parameter in the EventDeletedEx event. How can this be done? Is BeforeEditOperation the way to go? The problem with the BeforeEditOperation, is that on deleting an event, there is NO reference to the event being deleted... Also, this event seems to occur before the user select to delete "the series" or "just this occurrence" so it is kind of useless for recurring events.
Also, I'm experiencing a strange behaviour. If the event is NOT recurring, the event still exist in the database while in the EventDeletedEx event. However, if the event has a recurrence and the user selects to delete all recurrences, the event has already been deleted by the time this event is raised!!! I have extra fields in the Event table used for synchronizing some other data and when the event has recurrences, well I can't get those field values as the record no longer exists.
This seems like a bug to me.
|
|||
afy65
Newbie Joined: 12 October 2008 Location: United Kingdom Status: Offline Points: 1 |
Post Options
Thanks(0)
|
||
Ahh! - Had sort of the same problem as you - was checking some custom properties for conflicts and if found cancel the drag/drop, tell the user of the conflict, and then return the event to is original position.
There maybe an easier way of doing this but I could find no documentation anywhere - Anyway
Declared a temp event variable at the top of the module.
In the calCalendarEvents_BeforeEditOperation event I added the following:
In the calCalendarEvents_EventChanged event I added the following:
Hope this helps - should be fairly easy to modify the code so that the user can cancel an event via a prompt instead of a conflict. If you need more help then drop me a line. ;-)
|
|||
PPL1
Groupie Joined: 10 April 2006 Location: Canada Status: Offline Points: 70 |
Post Options
Thanks(0)
|
||
bump
|
|||
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 |