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

[Solved] Hide NavigationPane View Tabs post back error

1 Answer 70 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 13 Oct 2009, 03:11 PM
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 ?

 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  
 
          
    } 



The viewstate error i get is
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

1 Answer, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 13 Oct 2009, 04:23 PM
Hi

I think i have fixed the problem.

Sorry to waste your time
Tags
Scheduler
Asked by
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Share this question
or