Hi
I have a problem with the setting ShowNavigationPane = false (I set this in Page_Init ,If i set it to true it all works fine)
In doing so, i get a problem with the viewstate when clicking the 'month' view tab, I think its because i am not setting a date at some point but i am unsure of what date i need to set it to ? Can you help ?
The viewstate error i get is
Thanks for your help in this matter
I have a problem with the setting ShowNavigationPane = false (I set this in Page_Init ,If i set it to true it all works fine)
In doing so, i get a problem with the viewstate when clicking the 'month' view tab, I think its because i am not setting a date at some point but i am unsure of what date i need to set it to ? Can you help ?
| protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e) |
| { |
| if (e.Command == SchedulerNavigationCommand.SwitchToDayView) |
| { |
| RadScheduler1.SelectedView = SchedulerViewType.DayView; |
| RadCalendar1.SelectedDate = e.SelectedDate.Date; |
| } |
| else |
| { |
| if (e.Command == SchedulerNavigationCommand.SwitchToWeekView) |
| { |
| RadScheduler1.SelectedView = SchedulerViewType.WeekView; |
| RadCalendar1.SelectedDate = e.SelectedDate.Date; |
| } |
| else |
| { |
| if (e.Command == SchedulerNavigationCommand.SwitchToMonthView) |
| { |
| RadScheduler1.SelectedView = SchedulerViewType.MonthView; // I THINK THE PROBLEM IS THAT I NEED TO SET THE MONTHS DATE HERE, BUT AM NOT SURE IN WHAT FORMAT? |
| } |
| else |
| { |
| RadScheduler1.SelectedView = SchedulerViewType.DayView; |
| RadCalendar1.SelectedDate = e.SelectedDate.Date; |
| } |
| } |
| } |
| datetimeFilter = e.SelectedDate.Date.ToShortDateString(); // this is used elsewhere in the page |
| BindData(); // binds data elsewhere |
| } |
| Execution Error |
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. |
Thanks for your help in this matter