Print Page | Close Window

Delete using the Del key

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=3658
Printed Date: 21 November 2024 at 9:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Delete using the Del key
Posted By: WaaZ
Subject: Delete using the Del key
Date 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




Replies:
Posted By: sserge
Date Posted: 16 February 2006 at 12:09pm
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


Posted By: WaaZ
Date Posted: 19 February 2006 at 5:58am

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



Posted By: WaaZ
Date Posted: 19 February 2006 at 10:09am

Within the handler PatternDeleted, CalendarControl.DataProvider.GetRecurrencePattern(e.patternI D); returns NULL . It is not supposed to. And this blocks me in getting the reference of the master object to delete.

Thnx



Posted By: sserge
Date Posted: 20 February 2006 at 4:32am
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net