disable datagrid popup menu?

Hi,
As a default functionality, the Datagrid popups a small menu ( including Undo,cut,copy...) when the mouse right clicked in any cell. How could i disable this? Or how could i disable single right click.

I really appreciated to share with me whatever came in
your mind...Thanks

[290 byte] By [codefund.com] at [2007-12-16]
# 1
Well, just looked at this for a few minutes. Certainly, setting the ContextMenu property of the control doesn't help--when you're editing a cell (the only time you see the menu you describe) the ContextMenu property for the GRID doesn't apply. Interested to see what the solution is... Sorry I can't help you, but at least can keep you from spending time on the wrong property <g>.
codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 2
Thanks for the reply. Let's explain more, may came with some idea:
The reason that i want to disable single right clcik in cell is because i need to handle double right click to load another form.
We know datagrid column style is a collection of DataGridTextBoxColumn which hosts a DataGridTextBox control. if i could some how overrides WndProc in DataGridTextBox, then
could disable single right click in cell.
codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 3
Set the column styles' TextBox.ContextMenu to a new ContextMenu: that way you don't have to override the DataGridTextBoxColumn to get what you want.
codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 4
Thanks for the reply.
In this case the New popup will show up. But i want totally to disable the popup. Show nothing on right single click.
codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 5
By default, a new ContextMenu is empty. So unless you add something to the ContextMenu, nothing will show up.
codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 6
Scott,
Tons of thanks. This tip helped me a lot. Thanks once again.
codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 7
Scott:

I would have sent this via private mail, but you didn't specify one...

Anyway, I've learned a bunch from your recent posts, and I wanted to thank you. You've obviously spent a lot of time with the DataGrid control!

Thanks!

codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...