Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Using Calendar control with Custom database?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using Calendar control with Custom database?

 Post Reply Post Reply
Author
Message
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
yossi View Drop Down
Newbie
Newbie


Joined: 15 January 2008
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote yossi Quote  Post ReplyReply Direct Link To This Post 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
 
 
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 08 February 2008 at 2:30am
Hi,

Any success? I am still wondering How to use my own data with calendar control?
Back to Top
yossi View Drop Down
Newbie
Newbie


Joined: 15 January 2008
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote yossi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
yossi View Drop Down
Newbie
Newbie


Joined: 15 January 2008
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote yossi Quote  Post ReplyReply Direct Link To This Post 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.
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.