Print Page | Close Window

Using Calendar control with Custom database?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=9236
Printed Date: 21 November 2024 at 5:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Using Calendar control with Custom database?
Posted By: prashant
Subject: Using Calendar control with Custom database?
Date 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.





Replies:
Posted By: sserge
Date 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 - http://www.codejock.com/support/articles/com/calendar/cp_3.asp

--
WBR,
Serge


Posted By: yossi
Date 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
 
 


Posted By: prashant
Date Posted: 08 February 2008 at 2:30am
Hi,

Any success? I am still wondering How to use my own data with calendar control?


Posted By: yossi
Date 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


Posted By: sserge
Date 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


Posted By: yossi
Date 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.
 
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net