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

RADScheduler diplay modes

2 Answers 63 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ken Walker
Top achievements
Rank 1
Ken Walker asked on 15 Jan 2009, 12:46 PM
Hi,

We are using the RADScheduler control and like to display scheduler in different modes like month, week, day or event view through the links/URL, please suggest how to achieve this functionality as the URL is same for all the views.

Your early response will be highly appreciated.

Thanks
Ken

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 15 Jan 2009, 02:02 PM
Hi Ken,

One posible solution is to use query strings. For example, generate your url with the following format:

http://localhost/WebSite53/Default4.aspx?SelectedView=MonthView

In page load get the value of the query string and set the SelectedView of RadScheduler accordingly:
protected void Page_Load(object sender, EventArgs e)  
    {         
        if (!IsPostBack)  
        {  
            string selectedView = Request.QueryString["SelectedView"];  
            switch (selectedView)  
            {  
                case "DayView":  
                    RadScheduler1.SelectedView = SchedulerViewType.DayView;  
                    break;  
                case "WeekView":  
                    RadScheduler1.SelectedView = SchedulerViewType.WeekView;  
                    break;  
                case "MonthView":  
                    RadScheduler1.SelectedView = SchedulerViewType.MonthView;  
                    break;  
                case "TimelineView":  
                    RadScheduler1.SelectedView = SchedulerViewType.TimelineView;  
                    break;                 
                default:  
                      
                    break;  
            }  
          
        }         
          
    } 


Kind regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Eric D. Burdo
Top achievements
Rank 2
answered on 30 Oct 2013, 05:01 PM

You can also use a Session Variable...

Something like this works:

Store the View in the Session.

Session["SelectedView"] = Telerik.Web.UI.SchedulerViewType.DayView;

 

Retrieve the View from the Session.

 

radScheduler.SelectedView = (SchedulerViewType)Session["SelectedView"];
Tags
Scheduler
Asked by
Ken Walker
Top achievements
Rank 1
Answers by
Peter
Telerik team
Eric D. Burdo
Top achievements
Rank 2
Share this question
or