Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Context Menu Customization

  • Undopo
    Undo
  • Cut
    Clipboardpo
    Clipboard
  • v
    v
    po
    po
    po
    Fontpo
    dialogboxlauncherFont
  • po
    po
    Paragraphpo
    dialogboxlauncherParagraph
  • Stylespo
    Styles
  • Editing
  • Table Style Optionspo
    Table Style Options
  • Table Stylespo
    Table Styles
  • v
    v
    Borders & Shadingspo
    dialogboxlauncherBorders & Shadings
  • Navigation
  • Options
  • Header from Top:
    +
    -
    Footer from Bottom:
    +
    -
    Positionpo
    Position
  • Close
  • v
    Shape Stylespo
    Shape Styles
  • dialogboxlauncherArrange

The ASP.NET Rich Text Editor (ASPxRichEdit) enables you to customize its context menu. By handling the PopupMenuShowing client-side event, you can perform the following actions with the ASPxRichEdit's context menu

  • Manipulate menu items - add new items, remove or disable existing ones (use the e.menuItems property);
  • Prevent the context menu from being displayed (use the e.cancel property).

In this demo, the PopupMenuShowing event is handled to illustrate the context menu customizing capabilities. Using check boxes, you can switch the context menu availability (via e.cancel) and control whether to clear or retain the default menu items when populating the menu with custom items (via e.menuItems). The custom items are implemented as ASPxClientRichEditPopupMenuItem objects by their name property. Clicks on custom menu items are processed using the CustomCommandExecuted client event. Its handler identifies the activated item by its name and performs the corresponding action on the client-side. In this demo, custom menu items create the Date and Time fields (using the createDateField and createTimeField client commands) and search the selected text in Google (the selected text is received via the Client API).

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxRichEditDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxRichEditDemos