Print Page | Close Window

Create Event Exception

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=3575
Printed Date: 05 May 2024 at 6:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Create Event Exception
Posted By: WaaZ
Subject: Create Event Exception
Date Posted: 31 January 2006 at 8:18am

Hi,

I wish to know, if I have a CalendarEvent "myEvent" with a recurrence object, and I wish to add an exception without the user clicking on the form.

Normally, if I can get hold of an event of state (CalendarEventRecurrenceState.xtpCalendarRecurrenceOccurrence), I can make it as an exception. How will I get hold of such an instance of calendarEvent, or how can I replicate my MasterEvent so that I can make another event of state (CalendarEventRecurrenceState.xtpCalendarRecurrenceException) under this particular event.

Thnx in advance for ur collaboration

WaaZ




Replies:
Posted By: sserge
Date Posted: 31 January 2006 at 1:36pm
Hi,

The idea is the folowing:

- You have an instance of event occurrence (you can get it by HitTest or in another way).
Recurrence state == xtpCalendarRecurrenceOccurrence      ; 

- Call pEvent.MakeAsRException() to change recurrence state (and store original occurrence Start/End times in separate members)

- Than you may change other pEvent properties.

- To commit your changes call pCalendar.DataProvider.ChangeEvent(pEvent)

That's it.

btw, if you enable "Show hidden members" option of the Object Browser, some other class members will be visible for you. They might sometimes be useful for extended operations.

--
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