1

WinForms .NET 3.5

We have a contextMenuStrip for data grid. This contextMenuStrip can hold multiple ToolStripMenuItems. Is there a way to provide ability to select multiple items in that drop down?

Research-> I looked at this one before C# Add Checkbox To WinForms Context Menu but as soon as I click on one of the items the Menu goes away, I want users to be able to select - multiple options and then click enter [or something else which is more standard - please advice]

Any points will be very helpful.

UPDATE

I am convinced by Gray and Passant; we decided to give a last option as "Select Multiple" which will invoke a small Form where user can use check boxes to select multiple options.

Thanks

Karephul.

Community
  • 1
  • 1
karephul
  • 1,473
  • 4
  • 19
  • 36
  • Ugh, it might be possible, but it's not a good idea. **This is not how menus work in Windows.** When you click an item, they go away. If you override this, the user is going to be very confused. You're also going to have to figure out when and how they should indicate that the menu should disappear. You should be able to use a menu with only the mouse, so `Enter` is not a solution. It won't work properly, either. `Enter` already "selects" the highlighted item, just as if you'd clicked it. You suggest something "more standard", but that doesn't exist. Everything you've imagined is non-standard. – Cody Gray - on strike Feb 17 '12 at 22:35
  • 1
    A window that doesn't disappear automatically on a click is a Form. – Hans Passant Feb 18 '12 at 01:07
  • how about you add another SubMenu(s) with Check-able support? – Desolator Feb 20 '12 at 08:04
  • Please post your update as an answer, not as part of the question. – LarsTech Feb 21 '12 at 15:43

1 Answers1

1

I am convinced by Gray and Passant; we decided to give a last option as "Select Multiple" which will invoke a small Form where user can use check boxes to select multiple options.

Thanks

Karephul.

karephul
  • 1,473
  • 4
  • 19
  • 36