How do I disable context menus "EditHeader" and "EditFooter", so that they don't show up?
How do I remove (rather than disable) context menu item "Hyperlink..."?
1 Answer, 1 is accepted
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 05 Oct 2018, 10:03 AM
Hello, Mihajlo,
The following code snippet demonstrates how you can control which items to be visible in the context menu that RadRichTextEditor shows and hide the redundant ones:
public RadForm1()
{
InitializeComponent();
Telerik.WinControls.RichTextEditor.UI.ContextMenu menu =
this.radRichTextEditor1.RichTextBoxElement.ContextMenu as Telerik.WinControls.RichTextEditor.UI.ContextMenu;
menu.ContentBuilder = new CustomContextMenuContentBuilder();
}
public class CustomContextMenuContentBuilder : Telerik.WinForms.RichTextEditor.RichTextBoxUI.Menus.ContextMenuContentBuilder
{
public override Telerik.WinForms.RichTextEditor.RichTextBoxUI.Menus.ContextMenuGroupCollection Construct()
Telerik.WinForms.RichTextEditor.RichTextBoxUI.Menus.ContextMenuGroup group = item as Telerik.WinForms.RichTextEditor.RichTextBoxUI.Menus.ContextMenuGroup;
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.