Click here to Skip to main content
15,908,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I right click a specify row, it means the right click just influence in current row!!! not anywhere in DataGridView I clicked the menu appear.

How can I track the Context Menu Strip changes on a specific row in Data Grid View when user right click on the data grid view and select an item from context menu. (The display of context menu is already working).
Updated 3-Jun-10 5:12am
Johnny J. 3-Jun-10 10:40am    
I have updated your subject line. Writing only "DataGridView" doesn't say much about your question. I hope I have understood it correctly...
Saman With You 3-Jun-10 11:14am    

1 solution

You need to handle an event of DataGridView called RowContextMenuStripChanged. This event will fire when context menu strip changes on a specific row. you can get the Row by e.Row inside the event method.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900