<?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 : Get working: Calendar with customized Datasource</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Get working: Calendar with customized Datasource]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 16 May 2026 01:29:44 +0000</pubDate>
  <lastBuildDate>Sat, 02 Mar 2013 03:33:15 +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=20658</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[Get working: Calendar with customized Datasource :  Hi guys, I want to use the calendar-control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20658&amp;PID=69788&amp;title=get-working-calendar-with-customized-datasource#69788</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7900">el austriaco</a><br /><strong>Subject:</strong> 20658<br /><strong>Posted:</strong> 02 March 2013 at 3:33am<br /><br />Hi guys, <br><br>I want to use the calendar-control with a customized datasource within Microsoft Access, but despite going through the samples provided (vb, vb.net and access) I couldn''t set it up. I could not find an easy accessible step-by-step guide to what I need. In the following you see how I imagine this to work (from what I have seen in the examples):<br><br>In Form_Load the calendar-objects (calender itself and date-picker) are loaded and attached to each other. <br><font color="#666666" face="Courier New, Courier, mono">Private Sub Form_Load()<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#339900"> 'Load Calendar</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set m_Calendar = Me.ocxCalendar.Object<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Calendar.SetDataProvider "Provider=Custom;"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Calendar.DataProvider.Create<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#339900">'Attach Date-Picker to calendar</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set m_DatePicker = Me.ocxDatePicker.Object<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_DatePicker.AttachToCalendar m_Calendar<br><br>End Sub</font><br><br>As there is no data-source assigned to the calendar I would expect the DoRetrieveDayEvents to be fired by the calendar-object in order to retrieve the events (=Load them to the Events-parameter) for the date-range currently on display. What actually happens is that the event is fired a few thousand times (for each day until year 2020+), seemingly without a reason. &nbsp;<br><font color="#666666" face="Courier New, Courier, mono">Private Sub m_Calendar_DoRetrieveDayEvents(ByVal dtDay As Date, ByVal Events As XtremeCalendarControl.CalendarEvents)<br>&nbsp; &nbsp;<br>&nbsp;&nbsp; m_RdeCounter = m_RdeCounter + 1<br>&nbsp;&nbsp; Debug.Print "EVT: m_Calendar_DoRetrieveDayEvents " &amp; dtDay &amp; ", event-occurence " &amp; m_RdeCounter<br>&nbsp;&nbsp; <br>End Sub</font><br><br>What I achieved so far is to load some events to the calendar-control. (But this is not exactly what I want as the user chooses the dates he wants to see within the calendar-controls.)<br><font color="#666666" face="Courier New, Courier, mono">Private Sub cmdTest_Click()<br><br>&nbsp;&nbsp; Dim c As Calendar 'This is my custom-calendar-object<br>&nbsp;&nbsp; Dim i As Calendar_Item<br>&nbsp;&nbsp; Dim j As XtremeCalendarControl.CalendarEvent<br><br>&nbsp;&nbsp; <font color="#339900">'Clear existing events</font><br>&nbsp;&nbsp; m_Calendar.DataProvider.ClearCache<br><br>&nbsp;&nbsp; <font color="#339900">'Load calendar</font><br>&nbsp;&nbsp; Set c = Cal_Data_Load<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; <font color="#339900">'Transfer calendar-items to code-jock-calendar</font><br>&nbsp;&nbsp; For Each i In c.Items<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set j = m_Calendar.DataProvider.CreateEvent<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me_Event_HereToJock i, j <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Calendar.DataProvider.AddEvent j<br>&nbsp;&nbsp; Next<br><br>&nbsp;&nbsp; m_Calendar.DataProvider.Save<br><br>&nbsp;&nbsp; <font color="#339900">'Redraw contol</font><br>&nbsp;&nbsp; m_Calendar.Populate<br><br>End Sub</font><br><br>This actually transfers the properties of 'my' calendar-item to the codejock one. The Id-thing I couldn't figure out either, although I obviously need to re-fetch it when later saving the element in the database. <br><font color="#666666" face="Courier New, Courier, mono">Private Sub Me_Event_HereToJock(Here As Calendar_Item, ByRef Jock As XtremeCalendarControl.CalendarEvent)<br><br>&nbsp;&nbsp; With Jock<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#339900">'.Id = Here.Id</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .StartTime = Here.Date_Start<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EndTime = Here.Date_End<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Subject = Here.Text<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Location = Nz(Here.AdrId, "")<br>&nbsp;&nbsp; End With<br><br>End Sub</font><br><br>So any chance to get help on this? I would just need a working example for a customized database as described for Ms Access or Vb.net. As I mentioned in the previous post I've already contacted codejock-support without reaction. So I am writing here in order to benefit from public knowledge. <img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" alt="Smile" title="Smile" /><br><br>The database containing the above code can be downloaded here: <br><a href="http://www.zaunsystem.net/cal.zip" target="_blank">http://www.zaunsystem.net/cal.zip</a><br><br>Thanks for any reponse! <br><br>Georg <br>]]>
   </description>
   <pubDate>Sat, 02 Mar 2013 03:33:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20658&amp;PID=69788&amp;title=get-working-calendar-with-customized-datasource#69788</guid>
  </item> 
 </channel>
</rss>