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

[Solved] Navigation in MonthView switches to DayView

1 Answer 122 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Shane Kelly
Top achievements
Rank 1
Shane Kelly asked on 21 Dec 2009, 02:37 AM
I have a databound RadScheduler with the selected view set to MonthView in the ascx page and again in the codebehind. When the page loads the calendar is in MonthView as expected, but if I click the left or right naviation to scroll between months the calendar switches to DayView. If I switch back to MonthView and click the left or right navigation again the calendar remains in month view. It seem that I have to actually click the Month link (even if the calendar is loaded in MonthView) before it will remain in MonthView when navigating to next or previous months.

How can a load the RadScheduler in MonthView and ensure that, if a user clicks the left or right navigation to navigate through the months, it remains in monthView, or in fact which ever view is set as the selected view?

You can see this behaviour at http://esperance.demo.verdicms.com/2/43/1/community_events.pm

Here is a snippet of the ascx page with the RadSchedular showing that the SelectedView property is set to MonthView.

<telerik:RadScheduler ID="RadScheduler1"  
                                runat="server"  
                                HoursPanelTimeFormat="htt"  
                                DataKeyField="Identifier"  
                                DataStartField="EventTimeStartDate"  
                                DataEndField="EventTimeEndDate"  
                                DataSubjectField="Title"  
                                onappointmentcreated="RadScheduler1_AppointmentCreated"  
                                OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"  
                                SelectedView="MonthView" 
                                ReadOnly="true"  
                                AllowDelete="false"  
                                AllowEdit="false"  
                                AllowInsert="false"  
                                Skin="Office2007"  
                                DayStartTime="08:00:00"  
                                DayEndTime="18:00:00"  
                                TimelineView-UserSelectable="false"  
                                DayView-UserSelectable="true"  
                                WeekView-UserSelectable="true"  
                                MonthView-UserSelectable="true"  
                                Width="400"  
                                Height="400"  
                                RowHeight="20"  
                                MonthView-HeaderDateFormat="MMM yyy" 
                                WeekView-HeaderDateFormat="dd MMM yyy"  
                                DayView-HeaderDateFormat="dddd, dd MMM yyy" 
                                OnNavigationCommand="RadScheduler_NavigationCommand"  
                                ValidationGroup="ctl00_RadScheduler1"  
                                Culture="English (Australia)"  
                                Font-Size="XX-Small"




1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 22 Dec 2009, 11:37 AM
Hi Shane,

How do you set SelectedView in code-behind? Also, why do you have to do this after you have set the property declaratively in the ascx code?


Best wishes,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Scheduler
Asked by
Shane Kelly
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or