Strange Problem |
Post Reply |
Author | |
dneilsen
Newbie Joined: 18 April 2006 Location: Australia Status: Offline Points: 19 |
Post Options
Thanks(0)
Posted: 04 May 2006 at 10:26pm |
I have encountered a strange occurance in the calendar control. Not sure if it is something I have done or not.
Here is the piece of code I am using
Now this all works fine except in one situation. Lets say the calendar is showing August 2005 (which has 5 week rows in the calendar) and I change to October 2005 (which has 6). What occurs is that CalendarViewDay's on the 6th row of the calendar dont seem to return correctly in the following line. CalendarViewDay cvd = this.ActiveView; cvs.Date is always set to 30/12/1899 In my code this results in the two events that should be created on that 6th line, to not be created. However, if I then run the exact same function again, immediately after the failed attempt, it works fine. My question is... I am quite new to these controls so it is quite possible I am not doing something correctly... Is it my code (or something i have done) or is it a bug? |
|
dneilsen
Newbie Joined: 18 April 2006 Location: Australia Status: Offline Points: 19 |
Post Options
Thanks(0)
|
oh yeah
I nearly forgot.... The debug output (from my addDebug command) is as follows
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
When you change MonthView.WeeksCount - you have to call Populate method first to adjust calendar view days collection. (should be done before accesssing ActiveView members) this.DataProvider.RemoveAllEvents(); this.Populate(); -- WBR, Serge |
|
dneilsen
Newbie Joined: 18 April 2006 Location: Australia Status: Offline Points: 19 |
Post Options
Thanks(0)
|
ahh sweet.
Thought it was something I had done (or had not done) Thanks again sserge |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |