Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Events not visible when calendar resource is used.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Events not visible when calendar resource is used.

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


Joined: 02 September 2005
Location: India
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nataraj Quote  Post ReplyReply Direct Link To This Post Topic: Events not visible when calendar resource is used.
    Posted: 01 September 2007 at 6:55am
Hi,
Iam using calendar control 10.3. Iam using the following code to show the name of the resource in the header. But when i add the id to the scheduleids collection i no longer see the events.
 
   Dim loNewEvent As CalendarEvent, loCalendarEvent As CalendarEvent
    Dim loSchedules As CalendarSchedules
    Dim loCalendarResource As CalendarResource
   
    With CalendarControl1
        .DataProvider.Create
        Set loCalendarResource = .MultipleResources(0)
       
        Set loNewEvent = loCalendarResource.DataProvider.CreateEvent
        loNewEvent.Subject = "Test event"
        loNewEvent.StartTime = Now
        loNewEvent.EndTime = DateAdd("n", 30, loNewEvent.StartTime)
        loCalendarResource.DataProvider.AddEvent loNewEvent
       
        Set loSchedules = loCalendarResource.DataProvider.Schedules
        loSchedules.AddNewSchedule "First"
        loCalendarResource.Name = "My resource"
        loCalendarResource.ScheduleIDs.Add loSchedules.Item(0).Id
        .Populate
        .RedrawControl
    End With
 
if i comment the line loCalendarResource.ScheduleIDs.Add loSchedules.Item(0) then iam able to see the event but not the header.
 
what is wrong in the above code which prevents the event from being displayed. When i use the getevent method to retrieve the event i get and instance of the event. So iam sure that the event is there in memory but not visible.
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.125 seconds.