![]() |
Delete using the Del key |
Post Reply ![]() |
Author | |
WaaZ ![]() Senior Member ![]() Joined: 31 January 2006 Location: United Kingdom Status: Offline Points: 103 |
![]() ![]() ![]() ![]() ![]() Posted: 15 February 2006 at 12:07pm |
When I delete an event using the del key and the event is in an occurence, I have a form that popups with two options; 1) Delete occurence 2) Delete series I cannot use e.eventId obtained from the event handler to get hold of the event using CalendarControl.Dateprovider.getEvent() since the event in an occurence one. I manage to get hold of the event using the mouseDown handler How can I make the difference, within the handler, of which type of deletion the user has chosen (series or occurence). Is there any property or object that can be invoked to know the choice of the user? The only difference I found out for the moment is that when the user choose delete series, the event has null as reference for recurrencePattern, which is wrong since we need to get hold of the master event if we deleting a series., so that we can persist this according to our own data model. Thnx WaaZ |
|
![]() |
|
sserge ![]() Moderator Group ![]() Joined: 01 December 2004 Status: Offline Points: 1297 |
![]() ![]() ![]() ![]() ![]() |
When you choose "Delete series" option, then a master event is deleted.
That means you will receive PatternDeleted event also. You can use PatternID to find the master event to delete. -- WBR, Serge |
|
![]() |
|
WaaZ ![]() Senior Member ![]() Joined: 31 January 2006 Location: United Kingdom Status: Offline Points: 103 |
![]() ![]() ![]() ![]() ![]() |
Thnx. This means I need to listen to the handler for a pattern deletion, and I will get the reference of the master as u said. Thnx |
|
![]() |
|
WaaZ ![]() Senior Member ![]() Joined: 31 January 2006 Location: United Kingdom Status: Offline Points: 103 |
![]() ![]() ![]() ![]() ![]() |
Within the handler PatternDeleted, CalendarControl.DataProvider.GetRecurrencePattern(e.patternI D); returns NULL Thnx |
|
![]() |
|
sserge ![]() Moderator Group ![]() Joined: 01 December 2004 Status: Offline Points: 1297 |
![]() ![]() ![]() ![]() ![]() |
This is correct.
You have to find master event in your data storage using PatternID. The relation is 1 to 1, that means for each PatternID there is only one master event. -- WBR, Serge |
|
![]() |
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 |