|  | 
| Using Calendar control with Custom database? | 
| Post Reply   | 
| Author | |
| prashant   Senior Member     Joined: 19 February 2007 Location: India Status: Offline Points: 165 |  Post Options  Thanks(0)  Quote  Reply  Topic: Using Calendar control with Custom database? Posted: 07 January 2008 at 3:03am | 
| 
   Hello Codejock Team, Warm Regards. I am using Codejock 10.4.2 and want to implement Calendar Control in my application. Can I populate calendar control with my own custom database? I have gone through the calendar demo, It's using 1) Memory data provider (*.xtp_cal) 2) Database data provider (*.mdb) 3) MAPI data provider. How do I provide my own custom data as input to Calendar control? Thanks in advance.  | |
|  | |
| sserge   Moderator Group   Joined: 01 December 2004 Status: Offline Points: 1297 |  Post Options  Thanks(0)  Quote  Reply  Posted: 09 January 2008 at 4:46pm | 
| 
   Hi, take a look at the following article: http://www.codejock.com/support/articles/com/calendar/cp_3.asp -- WBR, Serge | |
|  | |
| yossi   Newbie   Joined: 15 January 2008 Location: United States Status: Offline Points: 14 |  Post Options  Thanks(0)  Quote  Reply  Posted: 04 February 2008 at 5:17pm | 
| 
   Hi Serge,
 I tested the 2 data provider methods (memory and custom DB). Both appear different in the sense that with the memory method you create the events and add them ("push") to CXTPCalendarData, whereas with custom method, the events are "pulled" using a "must" implementation of RetrieveDayEvents/Do_xxx, and others. Is there something in between? For example I tried to derive a class from CXTPCalendarData in order to take advantage of its functionality, but without much success. Although the events were added (with success) to the derived calendar data object, the CXTPCalendarControl was not able to Populate them. I did use pCalendarControl->SetDataProvider( myDataProvider ), however when I inspect the provider it shows as xtpCalendarDataProviderUnknown. What am I missing? Thanks | |
|  | |
| prashant   Senior Member     Joined: 19 February 2007 Location: India Status: Offline Points: 165 |  Post Options  Thanks(0)  Quote  Reply  Posted: 08 February 2008 at 2:30am | 
| 
   Hi, Any success? I am still wondering How to use my own data with calendar control? | |
|  | |
| yossi   Newbie   Joined: 15 January 2008 Location: United States Status: Offline Points: 14 |  Post Options  Thanks(0)  Quote  Reply  Posted: 08 February 2008 at 3:23am | 
| 
   Hi prashant,
 Yeah, I don't have any problems using either of the two methods with my own data. If you are not using DB source to "pull" data from, then you just use the CXTPCalendarControl to get a CXTPCalendarData from and then populate it with your own data. Are you using a CXTPCalendarControlView derived view?  I couldn't derive a "memory" type CXTPCalendarData of my own though. Instead I justed instantiated one in a wrapper class and delegated calls to it. Still my original question remains... Thanks | |
|  | |
| sserge   Moderator Group   Joined: 01 December 2004 Status: Offline Points: 1297 |  Post Options  Thanks(0)  Quote  Reply  Posted: 11 February 2008 at 5:27pm | 
| 
   Well, why haven't you derived your custom data provider from CXTPCalendarCustomDataProvider ? Most likely that's the problem why your CXTPCalendarData-derived class doesn't work... -- WBR, Serge | |
|  | |
| yossi   Newbie   Joined: 15 January 2008 Location: United States Status: Offline Points: 14 |  Post Options  Thanks(0)  Quote  Reply  Posted: 13 February 2008 at 6:00am | 
| 
   Hi Serge,
 Thanks for your response. I was under the impression that methods such as DoRetrieveDayEvents() and DoRead_Event() and others must be implemented (at least according to comments made in the SQLServerDataProvider example). But maybe not, and base class defaults are sufficient. I can give it a try. That would be perfect in terms of design; because I want to add/create all events with the data provider at once - when I get notification from my model. | |
|  | |
| 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 |