womenqert.blogg.se

Devexpress menustrip
Devexpress menustrip







devexpress menustrip
  1. Devexpress menustrip update#
  2. Devexpress menustrip code#

You can see the original bug report here on Microsoft Connect. It turns out that this is a known bug that someone decided was "by design". You've assigned the ContextMenuStrip to the RowTemplate of a DataGridView control, and are therefore not able to modify items contained in that context menu in its Opening event handler method.

Devexpress menustrip code#

If you're stuck, see the sample code here: How to: Handle the ContextMenuStrip Opening EventĮDIT: Armed with new information provided in the comments, I've now isolated the source of the problem. If it's not working for you, you're doing something else wrong, and you need to give us some more information to go on. I can guarantee that setting the Enabled property of the ToolStripMenuItem that you want to disable to false in the Opening event handler will work. I have no idea what INFOpermission.accessAuthorize is because you didn't show the code that defines that (enum?), but if it's anything other than false, this isn't going to work out like you expect.

devexpress menustrip devexpress menustrip

Within the event handler, insert code similar to the following code example to create and display new instances of Form2 as MDI children of Form1.You need to set toolStripAuthorize.Enabled to either true or false. Form2 menu itemĬreate an event handler for the xref.Click event of the &Openxref. Set the xref: and xref.MergeIndex%2A properties of the Form2 menu items as shown in the following table. To insert a MenuStrip into an MDI drop-down menuĬreate a form and set its xref.IsMdiContainer%2A property to true.Īdd a xref: to Form1 and set the xref.AllowMerge%2A property of the xref: to true.Īdd a top-level menu item to the Form1xref: and set its xref.Text%2A property to &File.Īdd three submenu items to the &File menu item and set their xref.Text%2A properties to &Open, &Import from, and E&xit.Īdd two submenu items to the &Import from submenu item and set their xref.Text%2A properties to &Word and &Excel.Īdd a form to the project, add a xref: to the form, and set the xref.AllowMerge%2A property of the Form2xref: to true.Īdd a top-level menu item to the Form2xref: and set its xref.Text%2A property to &File.Īdd submenu items to the &File menu of Form2 in the following order: a xref:, &Save, &Close``and Save, and another xref. Closing the MDI child window removes the inserted menu items from the MDI parent. The following procedure uses the xref.IsMdiContainer%2A, xref.AllowMerge%2A, xref:, and xref.MergeIndex%2A properties to insert a group of menu items from the MDI child menu into the drop-down part of the MDI parent menu.

devexpress menustrip

Devexpress menustrip update#

In that case, you want to update the contents of the MDI parent's menu with the contents of the MDI child's menu as MDI child windows of different kinds are activated. For example, the MDI parent might be a spreadsheet, and the MDI child might be a chart. In some applications, the kind of a multiple-document interface (MDI) child window can be different from the MDI parent window. How to: Insert a MenuStrip into an MDI Drop-Down Menu (Windows Forms)









Devexpress menustrip