Hi,
I have a problem with changing MdiParent.
My app is like this.
I have two forms with UltraTabbedMdiManager in each form. I added a context menu on the Tab it self to be sent between the two forms.
I was using this code to send it between the forms:
a.MdiParent = Nothinga.MdiParent = m_SencondaryMDIContainer
I needed to add MdiParent = Nothing to even get the form to be loaded correctly in the new MdiContainer.
But when I did that I lost the context menu of the Grid that I have in the MdiChild.
If I skip the MdiParent = Nothing then the context menu is still there but then it will not be loaded correctly.
Can this be done in some other way?
What are you using to provide your context menu? Are you using a context menu of the UltraToolbarsManager?
If so, then where is the UltraToolbarsManager? Is there an UltraToolbarsManager on the child form? Is there one on the Mdi parent form?
Which one does the context menu come from?
Does this work if you do not use the TabbedMdiManager? You can test this out by setting Enabled to False on the TabbedMdiManager.
The setup of my controls is like this:MainGUI -> UltraTabbedMdiManagerEvery tab is a windows form that has a container area (panel).In that container area I am placing a usercontrol which consists of a UltraGrid and a UltraToobarsManager.
I am using usercontrol.UltraToolbarsManager.SetContextMenuUltra(UltraGrid, sMenuKey) to add the contextmenu. This is called when I right click in the grid.
MainGUI has a UltraToolbarsManager which is providing the main menu, this one is not used to provide context menu.
No, it does not work if I disable the TabbedMdiManager.
Same problem, the context menu works before I have changed the mdiparent, but not after.
Thanks for the help.
// Mathias
Hi Mathias,
Hm, I can't see any reason why you would lost your context menus in that case.
One thing you could try is to set usercontrol.UltraToolbarsManager.MdiMergable to false. That's just a wild guess, and I doubt it will work, but it's worth a try.
If that doesn't work, then we will need to try to duplicate the problem. Can you post a small sample project demonstrating this?
Ok, I will try that.
I also work on some small app to reproduce the problem.
I will get back to you when I have some app.
The best thing would be it I can't reproduce it and realize why. =)
Thanks for the help!
This looks like a bug to me. Since the ToolbarsManager is inside a UserControl, it should not be attempting to merge with the MdiParent form. But clearly, some kind of merging is taking place, since the MdiMergable property is having an effect.
I'm going to forward this thread over to Infragistics Developer Support so they can write it up for further investigation. But for now, setting MdiMergable to false should be a good workaround for you and it will not have any adverse effect. In fact, it might even improve performance a tiny bit. :)
Hi again,
Here is a small app to reproduce the problem with the context menu that get lost if you change the MdiParent.
If the setting MdiMergable is set to false in Grid -> UltraToolBarsManager1 it works.
Is this a bug or is it suppose to work like this?
To move the tab to another mdi parent, right click on the tab and select "Send tab to secondary window".
Thanks for your help!
Some screen shots:
Source code:
I will post a small app later, but short comment is that it is working when I set mdimergable to false.
Some clue what it might be then?