Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Pivot Grid
  [Collapse]Tree List
   [Expand]Product Information
   [Collapse]Feature Center
    [Expand]Data Binding
    [Expand]Nodes
    [Expand]Data Editing
    [Expand]Data Representation
    [Expand]Sorting
    [Expand]Filtering
    [Expand]Summaries
    [Expand]Appearances and Look And Feel
    [Expand]Focus, Selection and Navigation
     Formatting Cell Values
    [Collapse]Miscellaneous
     [Collapse]Context Menus
       Add Custom Menu Items to the Standard Menus
       Change the Behavior of the Standard Menu Items
       Control the Availability of the Standard Context Menus to End-Users
       Custom Menus
       Customize the Standard Context Menus
       Disable and Remove Particular Items in the Standard Menus
       Standard Context Menus
     [Expand]Export and Import Data
     [Expand]Print XtraTreeList
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End User Capabilities
   [Expand]Member Tables
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap 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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Control the Availability of the Standard Context Menus to End-Users

There are two ways to control the availability of the stadard context menus to end-users: via corresponding options and by handling an event.

Expanded Control the Display of Menus via Options

Menu options that control the availability of the standard context menus can be accessed via the TreeList.OptionsMenu property. These options allow you to disable or enable the column header and footer menus. Note that the Tree List elements for which menus are activated must be visible to allow the menus to be invoked. The visibility of these elements is controlled by the view options that can be accessed via the TreeList.OptionsView property.

The table below lists the types of menu and their visibility conditions.

Menu Type Visibility Condition
Column Header Panel Menu The TreeListOptionsMenu.EnableColumnMenu property must be set to true. The TreeListOptionsView.ShowColumns property must be set to true to display column headers.
Row Footer Menu The TreeListOptionsMenu.EnableFooterMenu property must be set to true. The TreeListOptionsView.ShowRowFooterSummary property must be set to true to display row footers.
Summary Footer Menu The TreeListOptionsMenu.EnableFooterMenu property must be set to true. The TreeListOptionsView.ShowSummaryFooter property must be set to true to display the summary footer.

For instance, you can write the following code to enable the column header menu and disable the footer menus.

Expanded Control the Display of Menus via Event

The TreeList.PopupMenuShowing event fires each time an end-user attempts to invoke any standard context menu. The event's parameters allow you to identify the type of menu, customize the menu or prevent it from being invoked. The following sample code handles the TreeList.PopupMenuShowing event to prohibit the menu for the Department column from being invoked.

How would you rate this topic?​​​​​​​