Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - CreateEventEx & multischedule
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CreateEventEx & multischedule

 Post Reply Post Reply
Author
Message
ma_cip View Drop Down
Newbie
Newbie


Joined: 10 April 2013
Location: Italy
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ma_cip Quote  Post ReplyReply Direct Link To This Post Topic: CreateEventEx & multischedule
    Posted: 10 April 2013 at 3:48am
Hi, I am evaluating Codejock Xtreme Calendar ActiveX in a MsAccess Application.

I need to load a Custom Data Provider (Recordset filtered).

Using CreateEventEx, (as suggested in http://www.codejock.com/support/articles/com/calendar/cp_3.asp) it works fine.

Anyway I'm not able to load events grouped in a multischedule layout (Users/Events)

This is the code used.
***
...
...
Dim thisEvent As CalendarEvent
dim MyCalendar As new CalendarControl
Dim g_DataResourcesMan  As New CalendarResourcesManager
Dim pData As CalendarDataProvider
Dim pSchedules As CalendarSchedules
Dim pRCDesc As CalendarResourceDescription

Set MyCalendar = Me.CalendarControl0.Object
Set pData = MyCalendar.DataProvider
Set pSchedules = pData.Schedules
 
pSchedules.AddNewSchedule ("xxx")
pSchedules.item(0).ID = 1
pSchedules.AddNewSchedule ("yyy")
pSchedules.item(1).ID = 2
If pSchedules Is Nothing Or pSchedules.count = 0 Then exit Sub
   
Dim Btsched As Byte
For Btsched = 0 To pSchedules.count - 1
g_DataResourcesMan.AddResource pSchedules(Btsched).name, True
Next i

Set thisEV = MyCalendar.DataProvider.CreateEventEx(99)
thisEV.StartTime = CDate(Now)
thisEV.body= "Event1"
....
....
thisEV.ScheduleID = 2
pData.AddEvent thisEV

Set thisEV = MyCalendar.DataProvider.CreateEventEx(100)
thisEV.StartTime = CDate(Now+1)
thisEV.body= "Event2"
....
....
thisEV.ScheduleID = 1
pData.AddEvent thisEV
...
...
MyCalendar.DataProvider.AddEvent thisEV

For i = 0 To g_DataResourcesMan.ResourcesCount - 1
    Set pRCDesc = g_DataResourcesMan.Resource(i)
        pRCDesc.Resource.SetDataProvider pData, false
            pRCDesc.Resource.ScheduleIDs.Add pSchedules(i).ID
                pRCDesc.GenerateName = True
Next i

g_DataResourcesMan.ApplyToCalendar MyCalendar

***

And the calendar appears blank, while not using multischedule option, it's correttly pupulated.

Has anyone any suggestion/trick ?
I need to solve this problem before the purchase of the control.

Thanks.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.