How to: Add an Item to the Context Menu
The following example demonstrates how to add a custom menu item to the context menu of a grid column. For this, it is necessary to add a corresponding bar item (e.g. BarCheckItem) to the DataViewBase.ColumnMenuCustomizations collection, and specify different item properties. Also, you can insert this item into a specific position by attaching the BarItemLinkActionBase.ItemLinkIndex property to it.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-customize-a-grids-context-menu-e1925.
<dxg:TableView.ColumnMenuCustomizations>
<dxb:BarCheckItem Name="checkItem1" Content="Checked" IsChecked="True" dxb:BarItemLinkActionBase.ItemLinkIndex="0" />
<dxb:BarItemLinkSeparator dxb:BarItemLinkActionBase.ItemLinkIndex="1" />
</dxg:TableView.ColumnMenuCustomizations>
private void customItem1_CheckedChanged(object sender, ItemClickEventArgs e) {
// do something...
}