Events not visible when calendar resource is used. |
Post Reply |
Author | |
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
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.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |