Print Page | Close Window

DoRetrieveDayEvents getting called Twice?

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=10355
Printed Date: 08 July 2024 at 2:52am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DoRetrieveDayEvents getting called Twice?
Posted By: prashant
Subject: DoRetrieveDayEvents getting called Twice?
Date 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.




Replies:
Posted By: prashant
Date 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).


Posted By: Alex H.
Date 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?


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



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