Nicky
  • Nicky
  • Newbie Topic Starter
2020-01-22T11:18:24Z
Hi,

I have used .net's ContextMenuStrip to create several menu's depending on the environment.

I use the Grid's MouseDown event to set the various ContextMenuStrips which works great if a row is selected, but if a row is not selected, the ContextMenuStrip never gets displayed.

Problem I have is, I use the ContextMenuStrip for adding new rows, but if there are no rows, it will not pop up. DOH!
(I tried doing MyContextMenu.Show() - but that doesn't work either, it is as though you are forcing the system to never show in this scenario)

Is there a reason why it isn't popping up and is easily fixable?

Many thanks in advance.
Nicky Wilkes
Senior Software Engineer
Igor/10Tec
2020-01-22T15:12:09Z
We need a sample to reproduce the problem.
Nicky
  • Nicky
  • Newbie Topic Starter
2020-01-23T08:17:00Z
Igor, I have just knocked up an almost identical demo, and it works as intended. I cannot for the life of me see any other settings I am doing that could be causing the original issue raised.
I will continue to dig deeper and let you know.

Thank you.
Nicky Wilkes
Senior Software Engineer
Nicky
  • Nicky
  • Newbie Topic Starter
2020-01-23T14:13:10Z
Update: It is something to do with the use of the iGCopyPasteManager, but still can't pinpoint it.
All I know is, if I don't call the "New iGCopyPasteManager" the ContextMenuStrip works in my application.

But in my Demo it makes no difference with or without which really makes no sense to me, there must be another setting somewhere. :-(

Nicky Wilkes
Senior Software Engineer
Nicky
  • Nicky
  • Newbie Topic Starter
2020-01-27T13:18:25Z
It seems to be a visual studio issue, apologies.

I renamed the ContextMenuStrip at some point and hadn't noticed it break. It had lost some internal reference somewhere and would not call the one menu, but would the others when I was debugging.

Didn't get to the bottom of of it, just re-created the menu and it is working again now.
Nicky Wilkes
Senior Software Engineer