问题
In my DataGridView, when I am editing a textbox cell, and I right click I get the following default Context Menu:
How can I disable this "feature" and instead have my own context Menu popup?
回答1:
Is this is what you asking about? You can find the similar question using this link.
private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
e.Control.ContextMenuStrip = myContextMenuStrip;
}
来源:https://stackoverflow.com/questions/16309613/removing-the-default-context-menu-when-editing-a-cell-in-datagridview