Context Menu

I had tried adding a context menu to a form with a menu item. But upon running the program, and upon right click, I could not see the context menu appear. Is there any other settings that need to be done Please advise.

Answer this question

Context Menu

  • Chrisatwg

    You should assign the context menu you've created to the control's ContextMenu propery, in order to make use of it. Form for example, you can assign context menu to its ContextMenu property.

    Hope this helps,

    -chris

  • Impacty

    Hi Chris,

    I intend to assign it to the DataGridView. But upon checking the DataGridView control properties, I can only see ContextMenuStrip. Is this the correct one


  • Beeblebrox_dk

    Hi,

    I could not associate DataGridView with Context Menu. The property of DataGridView ContextMenuStrip property shown it is none. And I can't do any editing to the property itself.

    Please help. Thanks


  • SK_Rajdev

    Hi Chris,

    I had manage to associate DataGridView with context menu. Thanks for your help.


  • Nick.Muguira

    Not ContextMenu.

    You need to create a ContextMenuStrip then associate it to DataGridView. For more information, see the DataGridView's FAQ document: http://www.windowsforms.net/Samples/Go%20To%20Market/DataGridView/DataGridView%20FAQ.doc

    You can read how to associate ContextMenuStrip to DataGridView in page 45.

    Regards,

    -chris



  • Zidan

    Yes, you need to use ContextMenuStrip in VS2005, instead of ContextMenu.

    -chris

  • Context Menu