custom datasource events |
Post Reply |
Author | |
RichardN
Newbie Joined: 17 May 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 17 May 2006 at 11:24am |
Hi, I'm just getting started with Xtreme Calendar. I was wondering how the calendar control expects the data to be returned from the custom datasource events. For instance when implementing the DoReadEvent method. I would expect to write something like this (pseudocode):
instead, the only way to create a calendarevent object seems to be by referencing the dataprovider object in the calendar control itself. If this is the case intentionally, how should I go about creating the object? should I use the createeventex method and presumably thereby add it to the calendar's collection of events? If so, why include pEvent as an argument? Are there any examples of these custom events already being implemented anywhere? Thanks, Richard. |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi Richard,
You're looking in a correct way. Just use DataProvider.CreateEventEx(EventID) method to create event object instead of using new operator. This is implemented in such way to manage internal references between Event object and data provider which owns this event. The pseudo code is:
There are also some other aspects for reccurrence events. Look at Calendar VB sample, SQL Server example. -- WBR, Serge |
|
RichardN
Newbie Joined: 17 May 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Thanks for the quick reply, I had a feeling it might work like that, the documentation isn't too clear about the way it should be done. Is that SQL server example available online, because the examples that came with the component don't appear to include any SQL server examples.
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
It is included in the standard suite installation. See \samples\Calendar\VB\CalendarSample -- SQL Server data provider (providerSQLServer.cls).
-- WBR, Serge |
|
RichardN
Newbie Joined: 17 May 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Thanks again, that was brilliant. I do have one other problem though. In a multiple schedules environment, is it possible to find out what scheduleid the selected time range is in when creating a new event.
If you look at the example files you can see that this feature is not implemented. Regardless of what schedule you had the selection for the default schedule for a new task is always John. |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Yes, I see that in current sample it's not implemented. However, that's easy - just get this value from HitTest info:
-- WBR, Serge |
|
RichardN
Newbie Joined: 17 May 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Yeah, I think you misunderstood my question, I wanted to find out what the schedule ID of the selected range is, not the schedule id of an existing event. This would allow me to make a new task from a selection in the calendar without having to ask the user which schedule it is for.
I phoned tech support yesterday and they say that this is coming in the new release (out friday) under calendarcontrol.activeview.selection.groupindex Thanks Guys! |
|
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 |