Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - DoRetrieveDayEvents getting called Twice?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DoRetrieveDayEvents getting called Twice?

 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: DoRetrieveDayEvents getting called Twice?
    Posted: 25 April 2008 at 3:15am
Hi,

I am having my own "2 Day" calendar mode, for displaying this mode I need to do following steps

Step 1)     GetCalendarCtrl().SwitchActiveView(xtpCalendarDayView);

Step 2)     CXTPCalendarDayView* pDayView =    
                 DYNAMIC_DOWNCAST(CXTPCalendarDayView,   
                GetCalendarCtrl().GetDayView());

                 pDayView->ShowDays(oleStartDay, oleEndDay);

Because of this "DoRetrieveDayEvents getting called Twice" which is unnecessary.

What is the proper solution for this problem?


You are providing
enum XTPCalendarViewType {
xtpCalendarDayView,
xtpCalendarWorkWeekView,
xtpCalendarWeekView,
xtpCalendarMonthView
};

Apart from this do you have any customizable Calendar View mode?
Thanks in advance.

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: 28 April 2008 at 5:04am
Hi,

Is there any solution for this? My call is going into recursion when I call SwitchActiveView and ShowDays.

Both functions are calling DoRetrieveDayEvents and I am already ready with the data in first call itself (SwitchActiveView).
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2008 at 11:10am
I have the same problem but this problem occurs only if I disable caching:

pData->SetCacheMode(xtpCalendarDPCacheModeOff);

But I think it shall also work without caching!
So it looks like an error of XTP 12.0.1?
Back to Top
Mattie161 View Drop Down
Newbie
Newbie


Joined: 23 February 2009
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mattie161 Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2009 at 10:55am
I also have this problem with DoRetrieveDayEvents being triggered twice for all days when cache mode is off and only upon loading up the form with the calendar on. Was there no solution?
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.