Events not visible with custom dataprovider |
Post Reply |
Author | |
RK007
Newbie Joined: 18 June 2010 Location: Netherlands Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 22 June 2010 at 3:50am |
I have a little problem to get my appointments visible when using a custom dataprovider. I think it is related to the moment I read the information, but I cannot figure out what is the right moment/event to read the information.
It works fine when using 'memory' as dataprovider, but then I miss a lot of flexibility/functionality I would like to implement. So let me try to explain in short what I try to accomplish. We have an inhouse developed language, which is able to communicate with COM objects. So I try to implement the CalendarControl by 'translating' the examples. It should be possible to show the appointments for one or more persons for a couple of weeks. The appointments have to be retrieved from two locations: an Oracle database and data stored on disk (.ics files). When an appointment is modified, the modifications should be saved at both locations. What I achieved right now is:
I think the moment the Events collection is filled might not be the correct moment, but I cannot figure out what the right moment should be. Or can it be related to the fact that I do not assign an EventID in the DoCreateEvent event (which doesn't seem to be fired by the way)? Can anybody give an indication when exactly do I have to read the appointments and how can I make them visible in the Calendar? |
|
RK007
Newbie Joined: 18 June 2010 Location: Netherlands Status: Offline Points: 7 |
Post Options
Thanks(0)
|
It looks like I have been able to solve it.
First of all I do not load the appointments with the DoGetAllEvents, but when my form is loaded. Additionally to test my single user calendar I put the scheduleID of all apointments fixed to 0 because I thought that was the default, but it should have been 1. Now my appointments do show up in the calendar. The only thing that is not working properly yet are the highlighted days in the datepicker. When I open the calendar in dayview only the actual day (if it has appointments) is shown in bold. When I open the calendar in weekview only the days of the week that have appointments are shown bold. After switching to another view all days that have an appointment are shown in bold. Any ideas? I already tried Populate(), RedrawControl() and DetachFromCalendar in combination with AttachToCalendar(). |
|
RK007
Newbie Joined: 18 June 2010 Location: Netherlands Status: Offline Points: 7 |
Post Options
Thanks(0)
|
I built next workaround to get all days with appointments highlighted in the DatePicker:
originalViewType := CalendarControl.viewtype // save actual ViewType CalendarControl.viewtype := 0 // Switch to DayView CalendarControl.DayView.ShowDays(start_date, end_date) // needed to get all dates highlighted CalendarControl.DayView.ShowDays(today, today) // needed to avoid that all days of all months are shown when switching to monthview CalendarControl.viewtype := originalViewType // return to original ViewType |
|
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 |