Print Page | Close Window

Lost events

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=3811
Printed Date: 21 November 2024 at 9:29pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Lost events
Posted By: WaaZ
Subject: Lost events
Date Posted: 19 March 2006 at 10:31am

Hi,

I added some events in the calendar. The events are recurrent Events. At times, I try to get a reference to the object using the ID, especially when I am not looking at the event, dataprovider.getEvent(int id) returns null, meaning that the event does not exist, event if it does exist.

Is it possible that the Id of the master event changes or that the Dataprovider returns null when I pass the masterID? Is it also possible that the ID change when i change view?

Thnks

WaaZ




Replies:
Posted By: sserge
Date Posted: 20 March 2006 at 6:35am
Hi,

Please note that event ID can be changed by the data provider only when you add event to the data provider (using AddEvent method).
After event is added its ID becomes permanent.
If you need to remember event ID, you can do that after AddEvent call.

pDataProvider.AddEvent(pEvent);
nMyID = pEvent.Id;

 
Note also that ocurrence has a temporary event ID because this is not a persistent object. The ocurrence event object is generated every time when calendar call GetDayEvents method of data provider and each time the same ocurrence will have different IDs.

That's because GetEvent(id) returns null for ocurrences (and for exceptions as well).

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