How to remove some of the right click menu items?

Hi,

How can I remove the right click menu items in calendar?
These are the menu items I want to remove:
1.New item/
2. New all day item
3. edit item
4.delete item

we only used the calendar menu as view of data schedule no transactions involve.

Thanks,
John

5 Replies

AL Allen March 12, 2018 06:14 AM UTC

cxtMenu = diagram1.ContextMenuStrip
cxtMenu.Items.Remove(cxtMenu.Items(0))


SN Sindhu Nagarajan Syncfusion Team March 12, 2018 12:56 PM UTC

Hi John, 
 
Thanks for contacting Syncfusion support. 
 
As per the Schedule control current support, the ContextMenuStrip contains 8 items and 2 toolstrip separator to provide the better look and feel. The items can be hidden based on the index of the item by setting the Visible property to False. Please make use of below code and sample, 
 
Code Example 
private void scheduleControl1_ScheduleAppointmentClick(object sender, ScheduleAppointmentClickEventArgs e) 
{ 
    if (e.ClickType == ScheduleAppointmentClickType.RightClick && scheduleControl1.GetScheduleHost().ContextMenuStrip != null) 
    { 
        this.scheduleControl1.GetScheduleHost().ContextMenuStrip.Items[0].Visible = false; 
        this.scheduleControl1.GetScheduleHost().ContextMenuStrip.Items[1].Visible = false; 
        this.scheduleControl1.GetScheduleHost().ContextMenuStrip.Items[2].Visible = false; 
        this.scheduleControl1.GetScheduleHost().ContextMenuStrip.Items[3].Visible = false; 
        this.scheduleControl1.GetScheduleHost().ContextMenuStrip.Items[4].Visible = false; 
        this.scheduleControl1.GetScheduleHost().ContextMenuStrip.Items[5].Visible = false; 
    } 
} 
 
 
 
Note: 
For Metro theme, the context menu items were loaded in the ContextMenuStrip .For themes other than metro, the context menu were loaded in ContextMenu  
 
Please let us know if you have any other queries. 
 
Regards, 
Sindhu  



LM Luis Miguel September 2, 2022 12:13 PM UTC

good morning friends, I have a doubt, the same thing happened to me and according to the indications I was able to solve it, on the one hand thanks, on the other hand I have doubts about how to implement it but with double click, that is, I go to the events and create a double click method , I enter the similar code but it does not work for me


How should I configure it so that the dialog box is not shown when I double click?doble1.pngdoble2.png



DM Dhanasekar Mohanraj Syncfusion Team September 5, 2022 02:48 PM UTC

Hi Luis Miguel,

We are a little unclear about your scenario. By default, when you are double-clicking the appointment label appointment form should be shown as you mentioned. Could you please confirm whether your requirement is to show the context menu strip while double click the appointment itself or once you are performing the right click after doing the double click? Based on your confirmation we will proceed with this further.


Regards,

Dhanasekar M.



WI will November 17, 2022 07:40 AM UTC

Look for the item you want to remove “Open With”, right click it and select “Delete” from the list. This will remove the key, its sub-keys and the option will not appear when you right-click a file.


Regards


Loader.
Up arrow icon