Search code examples
c#devexpressmenuitemright-clickdatagridcolumnheader

DevExpress column standard showpop menu add custom copy item it'S under cells


I want to add a custom menu item into standard popshow menu, which copies first cell value column and copies to its under cells. It should copy just its under cells.

I searched some things but couldn't find an example how to do. I found some examples but couldn't understand.

I want to do something like what I attached as a screenshot.

Can you help please?

I want to get something like that:

I want to something like that


Solution

  • The easiest way to accomplish this goal is to handle the PopupMenuShowing event. To get a grid cell value at the mouse click point, use the GridView.GetFocusedValue method.

    I suggest you to go through DevExpress Threads:
    How to achieve to right click cell and copy cell's value
    GridView Copy Context Menu
    Default Right Click Menu Xtra Grid Cell
    Right-click focus cell and show context menu
    How to add a new item to the default context menu of the GridView active editor