Print Page | Close Window

CalendarEvent Object

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=6469
Printed Date: 06 October 2024 at 1:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CalendarEvent Object
Posted By: Rod001
Subject: CalendarEvent Object
Date Posted: 20 February 2007 at 12:14pm
Hi,
 
How do I replace or change the subject, location, starttime, etc. properties that have already been displayed in a calendar view?
 
Thanks.



Replies:
Posted By: Rod001
Date Posted: 20 February 2007 at 6:45pm
I found a solution that works. Does this look Ok?
Private Sub ReplaceEventsLabel()

  Dim pEvent As CalendarEvent
  Dim Events As CalendarEvents

     Set Events = CalendarControl.DataProvider.GetAllEventsRaw()
     For Each pEvent In Events
          pEvent.Label = iEventsColorValue ' change events color
          CalendarControl.DataProvider.ChangeEvent pEvent
     Next

   end Sub

Rod



Posted By: sserge
Date Posted: 22 February 2007 at 3:10pm
Looks good.
 
But one note - recurrence exceptions will not be updated.
If you need this -- you have to check whether event is a recurrence master, get its pattern and iterate on exceptions, change them and call ChangeEvent in the same style as for other events.
But firstly update master event, then exceprions.
 
Other way - use PrePopulate event.
This allow you to update events dynamically before they are placed on the screen.
In this case events in Data provider are not changed and only visible events are updated.
 
--
WBR,
Serge


Posted By: Rod001
Date Posted: 22 February 2007 at 4:24pm
Serge,
 
Thank you!!



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