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

Right Click menu

2 Answers 254 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Craig Gamble
Top achievements
Rank 1
Craig Gamble asked on 08 Apr 2009, 03:16 PM
is it possible to edit this to allow us to add our own menu items?

also is there an event fired when rightclick happens? i need to check some values outside the sched before allowing access to right click menu

basically i was hoping to use this control to allow admin users to create date range events for a holiday booking website (basically assigning rates & availabilities) where they select the number of days they want. you then right click to get menu to allow you to opens my own popup screen where the user enters the the rates and availability for that date range and then saves. when the form closes then the scheduler will refresh/update with these details

am i asking too much of the control?

Cheers.
Craig

2 Answers, 1 is accepted

Sort by
0
Craig Gamble
Top achievements
Rank 1
answered on 09 Apr 2009, 02:11 PM
and i think ive got this one doing more or less what i want.

done away with right click menu option & stopped it opening the standard appointment edit dialog box on double click and instead opening my own dialog box
0
Jordan
Telerik team
answered on 10 Apr 2009, 11:57 AM
Hello Craig Gamble,

I am glad to see that you have achieved what you wanted.

Just in case here is some additional information:

How to disable the context menu:
http://www.telerik.com/community/forums/winforms/scheduler/radscheduler-right-menu.aspx

You can use the same event to modify the default context menu or to replace it with a custom one:

protected override void OnLoad(EventArgs e) 
        { 
            base.OnLoad(e); 
            SchedulerDemoHelper.AddSampleAppointments(this.radScheduler1); 
 
            this.radScheduler1.ContextMenuShowing += new EventHandler<SchedulerContextMenuShowingEventArgs>(radScheduler1_ContextMenuShowing); 
        } 
 
        private RadDropDownMenu contextMenu = null
 
        void radScheduler1_ContextMenuShowing(object sender, SchedulerContextMenuShowingEventArgs e) 
        { 
            if (this.contextMenu == null
            { 
                this.contextMenu = new RadDropDownMenu(); 
                RadMenuItem contextMenuItem = new RadMenuItem("My context menu item 1"); 
                this.contextMenu.Items.Add(contextMenuItem); 
                this.contextMenu.Items.Add(new RadMenuItem("My context menu item 2")); 
                contextMenuItem .Click += new EventHandler(ContextMenuTestForm_Click); 
            } 
            e.ContextMenu = this.contextMenu; 
        } 
 
        void ContextMenuTestForm_Click(object sender, EventArgs e) 
        { 
            MessageBox.Show("Custom context menu item was clicked"); 
        } 

How to customize the appointment edit dialog:
http://www.telerik.com/community/forums/winforms/scheduler/edit-appointment-dialogue.aspx

Greetings,
Jordan
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Scheduler and Reminder
Asked by
Craig Gamble
Top achievements
Rank 1
Answers by
Craig Gamble
Top achievements
Rank 1
Jordan
Telerik team
Share this question
or