Skip to main content
A newer version of this page is available. .

How to: Remove an Item from the Context Menu

The following example demonstrates how to remove a specific item from the context menu, which is shown for the Total Summary panel. For this, the RemoveBarItemAndLinkAction object is added to the DataViewBase.TotalSummaryMenuCustomizations collection, and the name of the bar item is specified by the corresponding field of the DefaultSummaryMenuItemNames class.

<dxg:TableView.TotalSummaryMenuCustomizations>
    <dxb:RemoveBarItemAndLinkAction ItemName="{x:Static dxg:DefaultSummaryMenuItemNames.Customize}" />
</dxg:TableView.TotalSummaryMenuCustomizations>