I'm wondering how I create a drop down menu button using Infragistics? (That is, the user hits a button, a number of options drop down, such as Save, Delete, Print, and the user can select one).
I think I have to use an UltraDropDownButton and an UltraToolbarsManager together somehow, but I cant for the life of me work it out. I think the WinMisc-Basic Features sample has what I'm after, but I'm having trouble working it out from that example.
Can anyone offer a few pointers?
Thanks.
This might help get you started:
1. Add an UltraToolbarsManager to your Form
2. Right-click on the toolbars manager in the component tray and select 'Customize...'
3. Click the 'Tools' tab in the customize dialog.
4. Click the 'New' button and add a in the tool type combo, select 'Popup Menu'
5. Specify a key to identify the menu (don't worry about the caption as it will not be seen) and click 'Add'
6. Change the tool type to 'Button' (or any other type of item you want in your drop down).
7. Add the tools you want to be seen in your drop down the same way you added the popup menu.
8. Click 'Close' on the 'New Tool' dialog
9. Select the 'PopupMenuTool Designer' tab on the customize dialog.
10. In the 'Current Menu' drop down, select the popup menu added in step 5.
11. Drag the tools you want in your drop down from the 'Available Tools' section to the section on the left.
12. Click 'Close' in the customize dialog
13. Add an UltraDropDownButton to the Form and select the new button.
14. In the VS property grid, drop down the arrow for the PopupItem property and select the popup menu added in step 5.
Basically, steps 1-12 deal with defining a drop down menu. The last two steps deal with how to use that menu in a separate drop down control.
Mike Dour"]This might help get you started:
Do these steps still work with v8.1? I have just upgraded my project from infragistics v7.3 to v8.1, as well as from VS2005 to VS2008, and it seems the above steps no longer work, even on a form which was previously working (I hadnt changed it - just upgraded it).
--- EDIT ---
Just had a quick look at an older version in which I had only upgraded Infragstics (not visual studio) - this one doesnt work either. An even older (compiled and installed on another computer) version which uses infragstics 7.3 works just fine.
Make sure all references in your project are for 8.1. If you have mixed references (some for 7.3 and some for 8.1), it could cause this issue. If not, this is definately a bug and I would recommend submitting it to the support group: http://es.infragistics.com/gethelp.
There are no references to 7.3 in this project.
It seems odd that such a bug has gotten through, as I cant see the usage of these drop down menus being rare. I'll go submit this now...
I was not able to reproduce the issue on my machine, but it could be a problem caused by a certain machine configuration.
However, it definately sounds to me like mulitple versions of our product are getting loaded. Another thing to try would be to make sure none of your Infragistics dll references have Copy Local set to True. Set them all to False. Then delete all entries from the licenses.licx file in the project. Also, if any of the Infragistics dll references have Specific Version set to True, make sure they point to the same version number.
I checked the infragistics references, and they are all how you said they should be.
I deleted the contents of licences.licx.
I uninstalled infragistics and reinstalled it.
Still doesnt work.
I should point out, that it only seems tob e a problem with the UltraDropDownButton. In other scenarios the UltraToolbarManager is working just fine:
1) In another form, I am dynamically generating a context menu - this works as I want it to.
2) On form where I am trying to use the UltraDropDownButton, if I put the code: ultraToolbarsManager1.ShowPopup("popupMenu"); , it shows the menu that I want to see on the UltraDropDownButton.
Its just the UltraDropDownButton - even though I have the popup menu selected in the "PopupItem" property.
I did log a bug thingy - but they tell me that it is working fine also.
Bit more research. I created a new project in VS2008/Infragistics 8.1, and this one works fine. The dropdownbutton works the way it should. So it seems it is just my development project.
I just did a search for 7.3 in my whole solution, and the only occurance was in the app.config file. I removed the following portion, which had no effect (dropdownbuttons still arnt working)
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Infragistics2.Win.UltraWinEditors.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Infragistics2.Win.UltraWinGrid.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Infragistics2.Shared.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Infragistics2.Win.Misc.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Infragistics2.Win.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> </assemblyBinding> </runtime>
Oh, I have reported it (to support). Their response was a matter of fact "Oh, this is how you have to do that".
An excerpt from their response:
" This is interesting scenario, and the trick is that you have created a popup menu for the child form, and when you display the child form as MDI parent, it contains popup menu but it does not correspond with the parent form, in other words the parent does not have a popup menu item - it should and the key must match. On the other hand when you display non-MDI form, it has no tie with the parent, and therefore it displays its own popup menu. You need to set up a popup menu item on the parent so it can relate with the child form. Keep in mind that the keys of popup items must match. "
Not the slightest indication that this is a bug.
I don't think its a feature. You would be able to show a merged menu in the parent manager by calling ShowPopup if it was defined only on the child and not the parent, so you should be able to show it with an UltraDropDownButton as well. I would recommend reporting it.
Apparently its not a bug - its a feature. If you put a popupmenu in the mdi container form, with the same name (I think key) as the one you use in your mdichild form, it starts working. From what I can tell, the logic is it will combine the two (from the main menu and child menu) into a single popup menu. I've now just created a bunch of blank popups in my main (parent) form, with the generic names PopupMenuTool1, PopupMenuTool2, etc, and make sure I use those same names in the child forms. I'm sure this must be convenient for some people - just not myself.
i have the same problem. I used the ig controls from 2006 volume 2. Now I upgraded to version 2008 volume 1 and the popup is no longer shown. when can we get a fix?
I see now. I think I misunderstood your original post stating the problem. So I apologize for the unneccessary back and forth about the version numbers. This is actually not the problem. I though you were stating that the last of my steps for defining an UltraDropDownButton (where you drop down the list of PopupItems and select the menu) was no longer working. I see now that the UltraDropDownButton was not dropping down the menu at run-time. I have checked and you are correct, it is because the form is an MdiChild. If a drop down button uses a popup menu from a toolbars manager which is merged into an mdi parent's toolbars manager, the drop down button can no longer show the popup. But it should be showing the merged popup menu from the parent's toolbars manager in this case.