Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Delete using the Del key
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Delete using the Del key

 Post Reply Post Reply
Author
Message
WaaZ View Drop Down
Senior Member
Senior Member


Joined: 31 January 2006
Location: United Kingdom
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaaZ Quote  Post ReplyReply Direct Link To This Post Topic: Delete using the Del key
    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

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WaaZ View Drop Down
Senior Member
Senior Member


Joined: 31 January 2006
Location: United Kingdom
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaaZ Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
WaaZ View Drop Down
Senior Member
Senior Member


Joined: 31 January 2006
Location: United Kingdom
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaaZ Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.