thanks but that method did not work in my case.
I was able to get things working with the following code:
private ContextMenuStrip _contextMenuStrip;
public Form1()
{
_contextMenuStrip = new ContextMenuStrip();
_contextMenuStrip.Items.Add("Cut", Properties.Resources.Cut, GridCutContextMenu);
_contextMenuStrip.Items.Add("Copy", Properties.Resources.Copy, GridCopyContextMenu);
_contextMenuStrip.Items.Add("Paste", Properties.Resources.Paste, GridPasteContextMenu);
var textRenderer = gridGroupingControl1.TableControl.CellRenderers["TextBox"] as GridTextBoxCellRenderer;
textRenderer.TextBox.MouseUp += GridGroupingControlTextBox_MouseUp;
}
void GridGroupingControlTextBox_MouseUp(object sender, MouseEventArgs e)
{
if(e.Button == MouseButtons.Right)
_contextMenuStrip.Show(Cursor.Position);
}
private void GridCutContextMenu(object sender, EventArgs e)
{
gridGroupingControl1.TableModel.CutPaste.Cut();
}
private void GridCopyContextMenu(object sender, EventArgs e)
{
gridGroupingControl1.TableModel.CutPaste.Copy();
}
private void GridPasteContextMenu(object sender, EventArgs e)
{
gridGroupingControl1.TableModel.CutPaste.Paste();
}