Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Is there a way to dynamically add a contextmenustrip to datagridview?

$
0
0

Hi,

I have a program that has a datagridview that is added to the form in the form_load event.  I'm trying to figure out how to add a contextmenustrip so that the user will be able to right click to copy and paste within the datagridview, similar to how it's done in Excel.

I keep looking but all examples I find on this show how to do it with a datagridview that was added in the Design window.  I can't do it like that since my dgv is added programmatically and does not yet exist on the form until I run the program. 

Any tips/suggestions are greatly appreciated! 

Thanks!

Joan


Viewing all articles
Browse latest Browse all 2535

Trending Articles