I've built a context menu that appears when a row in my Ultragrid is right clicked on. I then built a sub menu for a couple of items. All this works great, however, when the submenu appears, the main menu disappears. Is there a way to get the main menu to stay when the sub menu appears?
Are you using the UltraToolbarsManager to create the menu and submenu? If you are dynamically creating the UltraToolbarsManager, are you setting the DockWithinContainer property? If not, does setting this correct the behavior?
Please provide more details about how the context menu is being set up as this will help understand what may be happening.
I create the UltraToolbarsManager control via the GUI, but I am dynamically building the menus and attaching them to the manager via code. The DockWithContianer property is set.
I have included my code - but it is in a language known as Progress (or OpenEdge). I'm not sure how familiar you are with that language. Let me know if I need to explain anything in the code. But basically, the main menu is built via the BuildContextMenu and the sub-,menu's are build in the last three lines of that method (BuildMoveSubMenu, BuildReorderSubMenu, BuildPhysicianSubMenu). The menu is then called within the tmToolbars_ToolClick trigger. When the submenu's are called (check out any part of the OTHERWISE piece of the tmToolbars_ToolClick trigger, the main menu disappears).
For Progress/OpenEdge, typically they provide support for usage of the Infragistics controls in their environment and they reach out to us if necessary. Have you already reached out to their support?
No, because the thing I'm trying to do isn't really tied to the language but the tool (i.e. Infragistics). I'm wanting to dynamically build a menu that has sub-menus and prevent the parent menu from disappearing when the sub menu displays. That's not really an OpenEdge question. I can contact them if necessary though.
By default, the UltraToolBarsManager will keep the parent menu visible after opening the submenu. You can see this demonstrated in the attached Visual Studio sample. You can refer to this sample while doing your implementation in OpenEdge and if you need assistance implementing the same in OpenEdge, you should contact Progress support. Progress will be able to help and if needed they will work with us.
If you don’t have Visual Studio, you can use the following link to download the community version of VisualStudio.
Please let me know if you have any questions.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
This worked fantastic, I was able to convert it to OpenEdge and see where I went wrong. Thank you!
One follow-up question. I'm using the toolbar on an Infragistics ultragrid. I'd like the toolbar to NOT show up until a user has selected an actual row in the grid. I know that there is always an "active" row if you will in the grid, but is there some way to prevent the toolbar from showing until the user selects an actual row?
You can use ActiveRow.Selected property to determine whether to show/hide the toolbar, when a user has selected an actual row in the UltraGrid.
Please let me know if I may be of further assistance.
Great solution, thanks so much i was i little lost, but you describe the things so easy and works like a charm.