The following example demonstrates how to customize the grid's context menu at runtime. For instance this sample demonstrates how to remove the default 'Show Column Chooser' menu item from the Column Context Menu, and add a custom item instead.
Question Comments
Added By: Sævar Kristinsson at: 2/6/2013 6:42:06 AM
Hi, I would want to modify the column header context menu in design time. The only example I have found that touches this topic is this example or similar to it i.e. modifying the context menu in runtime. Could you guys give an example on how to do this in design time?
Added By: Thomas R Melinsky at: 5/27/2014 6:18:22 AMIs there a new version of this example for WPF that isn't event driven?
Added By: Ilya (DevExpress Support) at: 5/27/2014 9:08:19 AMHi Thomas,
Currently, the approach demonstrated in his example is the appropriate way to customize the grid popup menu at runtime. Would you please clarify why it is not an option for you?
Hi, how to add this into styles? So that the functionality is avialable to all the grids in an application.
Added By: Ivan (DevExpress Support) at: 5/26/2015 12:24:08 AMAs I can see, you have recently created a similar ticket - T246541. I have updated it to describe your requirements. We will answer you there soon.
Added By: Ahmed Bayyari at: 1/25/2016 1:20:56 PMGridMenuEventArgs is obsolete. Could you please put an example using PopupMenuShowingEventArgs which DevExpress recommends to use instead of GridMenuEventArgs. The method e.Customizations doesn't exist when using PopupMenuShowingEventArgs.