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

Programmatically change selected views

1 Answer 152 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mathew
Top achievements
Rank 1
Mathew asked on 08 Nov 2012, 02:03 PM
Hi, 

I would like to add a custom menu to the appointment context menu, that will only be available on weekview and monthview.
That menu should switch the scheduler to the dayview.

Ive been able to implement the extra menu item but i dont know how to tell the scheduler, from inside the AppointmentContextMenuItemClicked event to switch views and update.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Nov 2012, 04:43 AM
Hi Mathew,

Try the following code snippet to switch the RadScheduler to DayView on click of the AppointmentContextMenuItem.

C#:
protected void RadScheduler1_AppointmentContextMenuItemClicked(object sender, AppointmentContextMenuItemClickedEventArgs e)
{
    if (e.MenuItem.Text == "Your Text")
    {
        RadScheduler1.SelectedView = SchedulerViewType.DayView;
    }
}

Hope this helps.

Regards,
Princy.
Tags
Scheduler
Asked by
Mathew
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or