I have a GridControl with some rows on my DevExpress interface. When I right-click on some row of the grid I want to pop-up the same kind of menu like when i right-click on my desktop(win 7), but only with 3 options - Cut, Paste and Copy.
How to make this? Is there a way to say in the property editor of the GridControl "for every row if right-click then popup a Menu". If so, is this menu stored in a repository and what type is this menu?
Add this code into the 'PopupMenuShowing' event of your 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);
}
}
That's It!