<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : CalendarEvnt.CustomProperties doesnt work</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : CalendarEvnt.CustomProperties doesnt work]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 22:01:39 +0000</pubDate>
  <lastBuildDate>Sun, 17 Jul 2005 16:50:10 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=2576</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[CalendarEvnt.CustomProperties doesnt work : Ah, that makes sense! Thanks alot....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2576&amp;PID=7715&amp;title=calendarevnt-customproperties-doesnt-work#7715</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=658">dajv</a><br /><strong>Subject:</strong> 2576<br /><strong>Posted:</strong> 17 July 2005 at 4:50pm<br /><br />Ah, that makes sense! Thanks alot.]]>
   </description>
   <pubDate>Sun, 17 Jul 2005 16:50:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2576&amp;PID=7715&amp;title=calendarevnt-customproperties-doesnt-work#7715</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarEvnt.CustomProperties doesnt work : Hi,  Thanks -- the problem description...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2576&amp;PID=7693&amp;title=calendarevnt-customproperties-doesnt-work#7693</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 2576<br /><strong>Posted:</strong> 15 July 2005 at 2:04am<br /><br />Hi,<br /><br />Thanks -- the problem description is quite complete :)<br /><br />Thre are 3 basic methods in the data provider to work with events:<br />&nbsp;&nbsp;&nbsp;&nbsp;AddEvent()<br />&nbsp;&nbsp;&nbsp;&nbsp;ChangeEvent()<br />&nbsp;&nbsp;&nbsp;&nbsp;DeleteEvent()<br /> <br />You have just to call ChangeEvent() and event will be updated in the data provider storage.<br /><table width="99%"><tr><td><pre class="BBcode"><br />If Len(CalEvent.CustomProperties("ID")) = 0 Then <br />&nbsp;&nbsp;&nbsp;&nbsp;CalEvent.CustomProperties("ID") = 999&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<strong>xtmCalendar.DataProvider.ChangeEvent(CalEvent)</strong><br />End If <br /></pre></td></tr></table><br /><br />--<br />WBR,<br />Serge]]>
   </description>
   <pubDate>Fri, 15 Jul 2005 02:04:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2576&amp;PID=7693&amp;title=calendarevnt-customproperties-doesnt-work#7693</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarEvnt.CustomProperties doesnt work : (This was previously posted in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2576&amp;PID=7687&amp;title=calendarevnt-customproperties-doesnt-work#7687</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=658">dajv</a><br /><strong>Subject:</strong> 2576<br /><strong>Posted:</strong> 14 July 2005 at 4:51pm<br /><br />(This was previously posted in the ActiveX Suite foruim but SuperMario suggested I post it here.)<br /><br />The CalendarEvent.CustomProperties collection only seems to work when the event has been added via DataProvider.AddEvent. When an event is added on the calendar ("in place" event creation) I need to save it to the database. I have this code:<br /><font face="Courier New, Courier, mono"><br /><font size="1"><br />Private Sub xtmCalendar_EventAdded(ByVal EventID As Long)<br />&nbsp;&nbsp;&nbsp;&nbsp;Dim CalEvent As XtremeCalendarControl.CalendarEvent<br />&nbsp;&nbsp;&nbsp;&nbsp;Set CalEvent = xtmCalendar.DataProvider.GetEvent(EventID)<br />&nbsp;&nbsp;&nbsp;&nbsp;If Len(CalEvent.CustomProperties("ID")) = 0 Then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalEvent.CustomProperties("ID") = 999<br />&nbsp;&nbsp;&nbsp;&nbsp;End If<br />&nbsp;&nbsp;&nbsp;&nbsp;MsgBox  xtmCalendar.DataProvider.GetEvent(EventID).CustomProperties( "ID")<br /><br />End Sub<br /></font><br /></font><br />Where 999 is assigned would normally be a call to a function to create the event (appointment) in the application database, returning the new id of the appointment.<br />The CustomProperties collection is updated for the CalEvent object but not for the object in the DataProvider. The last line shows a message box with the "Empty" value of CustomProperties("ID").<br /><br />This means that Events that are added when the calendar control is initially set up (see below) have a CustomProperties("ID") value, but new events do not.<br /><br />Here is a small project reproducing it:<a href="uploads/dajv/2005-07-13_170056_CustomProperties.zip" target="_blank">2005-07-13_170056_CustomProperties.zip</a><br /><br />Am I using the DataProvider incorrectly?<br /><br /><br />Here is the code snippet that sets up the calendar:<br /><font face="Courier New, Courier, mono"><br /><font size="1"><br />frmMyForm.xtmCalendar.DataProvider.RemoveAllEvents<br /><br />Set rs = GetRecordSet("SELECT SQL THAT GETS APPOINTMENT RECORDS")<br /><br />Do While Not rs.EOF<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calendar_AddEvent Val(rs!ID), IIf(Len(NoNull(rs!&#091;Subject&#093;)) &gt; 0, rs!&#091;Subject&#093;, "Untitled"), NoNull(rs!&#091;Notes&#093;), rs!&#091;begin&#093;, rs!&#091;End&#093;, rs!Private, blnMeeting<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Records = Records + 1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rs.MoveNext<br />Loop<br /><br />frmMyForm.xtmCalendar.Populate<br />frmMyForm.xtmCalendar.RedrawControl<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><br /></font><br />And the Calendar_AddEvent() Function:<br /><font face="Courier New, Courier, mono"><br /><font size="1"><br />Public Function Calendar_AddEvent(ID As Long, Subject As String, Description As String, StartDateTime As Date, EndDateTime As Date, _<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Optional   PrivateFlag As Boolean = False, Optional MeetingFlag As Boolean = False, _<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Optional   RecurrenceType As Integer, Optional RecurrenceEndDate As Date) As XtremeCalendarControl.CalendarEvent<br />&nbsp;&nbsp;&nbsp;&nbsp;Dim CalEvent As XtremeCalendarControl.CalendarEvent<br />&nbsp;&nbsp;&nbsp;&nbsp;Dim CalRecurrence As CalendarRecurrencePattern<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;Set CalEvent = frmMyForm.xtmCalendar.DataProvider.CreateEvent()<br />&nbsp;&nbsp;&nbsp;&nbsp;If CalEvent Is Nothing Then Exit Function<br />&nbsp;&nbsp;&nbsp;&nbsp;CalEvent.StartTime = StartDateTime<br />&nbsp;&nbsp;&nbsp;&nbsp;CalEvent.EndTime = EndDateTime<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;CalEvent.Subject = Subject<br />&nbsp;&nbsp;&nbsp;&nbsp;CalEvent.PrivateFlag = PrivateFlag<br />&nbsp;&nbsp;&nbsp;&nbsp;CalEvent.MeetingFlag = MeetingFlag<br />&nbsp;&nbsp;&nbsp;&nbsp;CalEvent.BusyStatus = CalendarEventBusyStatus.xtpCalendarBusyStatusBusy<br />&nbsp;&nbsp;&nbsp;&nbsp;CalEvent.CustomProperties("ID") = ID<br /><br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frmMyForm.xtmCalendar.DataProv ider.A ddEvent CalEvent<br />&nbsp;&nbsp;&nbsp;&nbsp;Set Calendar_AddEvent = CalEvent<br />End Function<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><br /></font><br /><br />This is quite important to get resolved, so any prompt advice is appreciated.<br /><br />Thanks]]>
   </description>
   <pubDate>Thu, 14 Jul 2005 16:51:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2576&amp;PID=7687&amp;title=calendarevnt-customproperties-doesnt-work#7687</guid>
  </item> 
 </channel>
</rss>