Is ContextMenu working for DataGridView?

A

AlexS

Net 2.0

It looks like only ContextMenuStrip can work with DataGridView. Whatever I
tried with ContextMenu it's not shown.

Is this by design or I miss something simple?
 
A

Andrej Tozon

ContextMenu is deprecated in 2005 in favor of CotextMenuStrip. If you still
want to use ContextMenu, you have to assign it to the grid's ContextMenu
property at runtime and show it in the MouseUp event. See the ContextMenu
documentation for an example.

Hope that helps,
Andrej
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top