How to create a popup menu with a right click on the GridControl line?

I have a GridControl with some rows on my DevExpress interface. When I right-click on some grid line, I want to pop up in the same menu as when I right-click on my desktop (win 7), but with only three options - cut, paste and copy.

How to do it? Is there a way to say in the GridControl property editor "for each row, if you right-click and then open the menu." If so, is this menu stored in the repository and what type of menu is it?

+3
source share
2 answers

GridView ShowGridMenu, gridRow. , , :

+1
  • DevXpress.ExtraBars.BarManager.
  • DevXpress.ExtraBars.PopupMenu.
  • PopupMenu.
  • "PopupMenuShowing" GridView:

    private void gridView1_PopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e) 
    {
        if (e.HitInfo.InRow) 
        {
            System.Drawing.Point p2 = Control.MousePosition;
            this.popupMenu1.ShowPopup(p2);
        }
    }
    

!

+1

All Articles