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

Storing RadScheduler SelectedView in cookie. Possible?

1 Answer 76 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
GrZeCh
Top achievements
Rank 2
GrZeCh asked on 11 Sep 2008, 10:18 AM
Hello!

How can I store RadScheduler SelectedView in cookie?

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 12 Sep 2008, 02:17 PM
Hello GrZeCh,

I have just put up a small sample to illustrate how this can be done. The current view is stored in the NavigationComplete event (after it has changed) and it is applied in Page_Load:

private void Page_Load(object sender, EventArgs e) 
    HttpCookie viewTypeCookie = Request.Cookies["SchedulerSelectedView"]; 
    if (viewTypeCookie.Value != string.Empty) 
    { 
        SchedulerViewType viewType = (SchedulerViewType) Enum.Parse(typeof(SchedulerViewType), viewTypeCookie.Value); 
        RadScheduler1.SelectedView = viewType; 
    } 
 
protected void RadScheduler1_NavigationComplete(object sender, Telerik.Web.UI.SchedulerNavigationCompleteEventArgs e) 
    Response.Cookies["SchedulerSelectedView"].Value = RadScheduler1.SelectedView.ToString(); 
 

I hope this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
GrZeCh
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Share this question
or