Right Click menu

3 posts, 0 answers
  1. Craig Gamble
    Craig Gamble avatar
    71 posts
    Member since:
    Aug 2005

    Posted 08 Apr 2009 Link to this post

    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. Craig Gamble
    Craig Gamble avatar
    71 posts
    Member since:
    Aug 2005

    Posted 09 Apr 2009 Link to this post

    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
  3. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 10 Apr 2009 Link to this post

    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.
Back to Top