Click here to Skip to main content
16,022,069 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I used to select contextmenustrip under the Events section of the datadridview but now it is no longer there. Does anyone know I can get this to work? Thanks in advance. I am using VS 2022.

What I have tried:

Unfortunaley I do not know what to try.
Posted

1 solution

I found the solution myself.

1. You select ContextMenuStrip from the toolbox.

2. You code
this.dgvGeneric.ContextMenuStrip = this.contextMenuStrip1;

in your c# programs load method.
 
Share this answer
 
Comments
OriginalGriff 22-Aug-24 1:32am    
Or you just select it as the target for the ContextMenuStrip property in the designer ...

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