Print Page | Close Window

two ??- Change dates/refresh

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=6023
Printed Date: 22 November 2024 at 11:51pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: two ??- Change dates/refresh
Posted By: SteveB
Subject: two ??- Change dates/refresh
Date Posted: 07 January 2007 at 1:05pm
I want to be able to have my users click a toolbar button to move to the previous or next day.
 
Is there an easy way to do this?
 
Also, as the DB data is cached at the time of load, how can I 'refresh' since this will be used in a multi-user environment?
 
 



Replies:
Posted By: sserge
Date Posted: 09 January 2007 at 1:31pm
Hi,

1) There are no an easy way to scroll days in one method call. However, existing method also looks to be not really complex. Just read visible dates, scroll this range, and set visible dates back. See CalendarDayView members.

2) Use CalendarDataProvider.ClearCache and call .Populate to update the data.

--
WBR,
Serge


Posted By: SteveB
Date Posted: 09 January 2007 at 9:17pm

1) as a work around, I keep the currently displayed date in a global variable and then just use CalendarControl.ActiveView.ShowDay to display that date.

Is there a better way, as you mention to 'read visible dates'?

 

On a similar note, is there a way to read just the one days events? I am designing this for use in a physician's office with four practitioners. I've done some testing loading 10,000+ appointments without too much performance issues but can see a bit of a hesitation when using the above method to changes dates.

 

2) Works exactly as I had hoped!!!! THanks!!!

 



Posted By: sserge
Date Posted: 10 January 2007 at 4:35am
Originally posted by SteveB SteveB wrote:

1) as a work around, I keep the currently displayed date in a global variable and then just use CalendarControl.ActiveView.ShowDay to display that date.

Is there a better way, as you mention to 'read visible dates'?

 


See properties:
CalendarControl.ActiveView.DaysCount
CalendarControl.ActiveView.Days(nDayIndex).Date  - is day date
 
Use nDayIndex = 0 or DaysCount -1 to scroll backward and forward.


Originally posted by SteveB SteveB wrote:

On a similar note, is there a way to read just the one days events? I am designing this for use in a physician's office with four practitioners. I've done some testing loading 10,000+ appointments without too much performance issues but can see a bit of a hesitation when using the above method to changes dates.



Use method DataProvider.RetrieveDayEvents


--
WBR,
Serge



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