This is a migrated thread and some comments may be shown as answers.

[Solved] Hide NavigationPane causing viewstate error

0 Answers 72 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 14 Oct 2009, 09:27 AM
Hi

I was wondering if you could help me with a problem i am having?
Ideally i would like to be able to get the navpane to work but for some reason i cant. It doesnt seem to hold the date or view i am currently on (day, month etc) and thefore isnt showing the data i would expect to see. I assume that the function this calls when clicking the nav pane < > images is the 'RadScheduler1_NavigationCommand'. So because of this i tried to just hide the navigtion pane, but in doing so it would always cause a viewstate error when i clicked the 'month' in the view tab.

I think it must be something to do with me not passing the date when clicking the month button in or something ? but i am lost as to how to do so.

i enclose the sample of code where i think the error is occuring.

 protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)  
    {  
        switch (e.Command)  
        {  
            case SchedulerNavigationCommand.SwitchToDayView:  
                RadScheduler1.SelectedView = SchedulerViewType.DayView;  
                RadCalendar1.SelectedDate = e.SelectedDate.Date;  
                break;  
 
            case SchedulerNavigationCommand.SwitchToWeekView:  
                RadScheduler1.SelectedView = SchedulerViewType.WeekView;  
                RadCalendar1.SelectedDate = e.SelectedDate.Date;  
                break;  
 
            case SchedulerNavigationCommand.SwitchToMonthView:  
                RadScheduler1.SelectedView = SchedulerViewType.MonthView;                  
                break;  
 
            case SchedulerNavigationCommand.NavigateToNextPeriod:               
                RadCalendar1.SelectedDate = e.SelectedDate.Date;  
                break;  
 
            case SchedulerNavigationCommand.NavigateToPreviousPeriod:                 
                RadCalendar1.SelectedDate = e.SelectedDate.Date;  
                break;  
 
            default:  
                RadScheduler1.SelectedView = SchedulerViewType.DayView;  
                RadCalendar1.SelectedDate = e.SelectedDate.Date;  
                break;  
        }  
 
    
    } 

Thanks

No answers yet. Maybe you can help?

Tags
Scheduler
Asked by
Andrew
Top achievements
Rank 1
Share this question
or