[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Expand]Feature Center
   [Expand]Visual Elements
   [Expand]Design-Time Features
    [Expand]Data Binding
    [Expand]Data Editing
    [Expand]Data Representation
    [Expand]Focus and Selection
      How to: Add custom menu items to the standard menus
      How to: Change the behavior of the standard menu items
      How to: Create a custom context menu
      How to: Customize the print appearances
      How to: Disable and remove items from the standard context menus
      How to: Print a Tree List and Show its Print Preview
     How to: Drag XtraGrid rows to the XtraTreeList
     How to: Dynamically Show and Hide Specific Nodes
     How to: Format a Column's Numeric Values as Currency
   [Expand]End User Capabilities
   [Expand]Member Tables
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Add custom menu items to the standard menus

Expanded How to: Display a Command that Clears Summaries in the Footer

The following example demonstrates how to add a custom item to a standard context menu and handle the click event for this item. The TreeList.PopupMenuShowing event is handled to add the Clear All item to the summary footer menu. Clicking this item cancels the summary calculations for all Tree List columns.

Expanded How to: Display a Command that Deletes a Node

The example below shows how to display a custom context menu with a click on a node indicator. The menu contains the Delete Node command.

The TreeList.PopupMenuShowing event fires when the default menu is about to be shown. The TreeList.CalcHitInfo method in the event handler returns internal information about the clicked visual element. If a node indicator is clicked, the Delete Node command is added to the menu. The DXMenuItem.Click event handler removes the node.

Is this topic helpful?​​​​​​​