I am developing asp.net project in c#.In my application i use Devexpress htmleditors and i need custom conetxtmenu . So i tried to add conextmenu item from code behind but i got following errors.
1.DevExpress.Web.ASPxHtmlEditor.ASPxHtmlEditor.ContextMenuItems’ is inaccessible due to its protection level
2.The property or indexer ‘DevExpress.Web.ASPxHtmlEditor.ASPxHtmlEditor.ContextMenuItems’ cannot be used in this context because the get accessor is inaccessible
And this wht i tried in code behind.
htmlEdtBody.ContextMenuItems.Insert(0, new HtmlEditorContextMenuItem("Add Title...", "AddTitle"));
Anyone one knows what is the reason for that?
Thank you
I suggest you to go through ASPxHtmlEditor’s demo – Features – Context Menu, there is a nice demo, that help you understand how this will work.
Firstly set the ASPxHtmlEditorSettings.AllowContextMenu property. You may have to ASPxClientHtmlEditor.ContextMenuShowing event.
ASP.NET HTML Editor Control
Refer – Context Menu
this – ASPxGridView – Editing using popup menu and ContextMenu event may help you..