I have a websplitter on my page and an UltraWebMenu displaying in the top Panes of a horizontal splitter. When the popup shows, it only shows till it gets to the lower pane, then it stops. Is there anyway to make the Context menu show overtop of the bottom pane?
Ok, this is still a problem but its one of many we are having with implementing a context menu popup.
I'm really struggling to get the context menu to behave properly. Another developer got an example from your Export To Excel grid that used the Ajax getLocation to help triangulate the precise location of the x,y coordinates. This was a huge hurdle. Now we still have this original problem and a couple others. Any help would be greatly appreciated.
1)
Since the context menu on this grid, is huge, it needs to spill over the grid and past the container. Since our website dynamically loads user controls into a web panel we had the web panels sytle set to overflow:hidden. With the splitters this helped contain all dynamic controls within the web panel and the scrollbars behaved perfectly. As soon as I removed overflow:hidden the context menu will now overflow the controls as desired. This however causes problems with all our dynamic controls in that many of them will now overflow the web panel container. I know I could take each one, and change its height from 100% to an absolute height or wrap it with its own div, and set it to hide on overflow. Is there anyway to have the parents container (the Web Panel) have its style overflow:hidden while getting the context menu only to overflow? Probably not, but I had to ask.
2)
We are getting the issue that once the context menu is displaying, getting it to close can be an odd affair. If I click to the right of it, it goes away immediately (as expected). If we click to the left of it (in the grid) we have to click about 2-3 inches to the left past where the context menu actually is displaying. I believe it thinks that it is within the context menu still because if I right click again in this phantom area, a context menu (ie default) will popup overtop of our context. I don't know if this is caused because the items in the context menu are created dynamically in code behind (only the items are created, the aspx page has an empty context menu on it). Can you think of any reason for this, I put break points in the grids clientside mouse down, which closes the context menu and it won't fire until I go about 3 inches to the left past where the menu actually is displaying. Also why can I right click in the context menu and bring up the IE context menu. Here is the code we are using to show the context menu. We use the logic below on several other controls and it works perfectly. If you click the grid to the left of the context menu, you can click right next to it, and it closes the context menu immediately (both use the client mouse down event).
function ShowContextMenu(evt, menuId, IsUsrCtrlContextMenu) { var contextXpos = 0; var contextYpos = 0; //Firefox passes event arg as parameter (evt). If that is null, we'll use window.event (Internet Explorer proprietary) var e=evt?evt:window.event; //If the current context is from a user get control panel location to position //context menu correctly if(IsUsrCtrlContextMenu) { var controlPanelPos = Sys.UI.DomElement.getLocation(document.getElementById('<%= this.pnCustomControl.ClientID %>')); contextXpos = (e.clientX + document.documentElement.scrollLeft) - controlPanelPos.x; contextYpos = (e.clientY + document.documentElement.scrollTop) - controlPanelPos.y; } else { contextXpos = (e.clientX + document.documentElement.scrollLeft); contextYpos = (e.clientY + document.documentElement.scrollTop); } //Show Menu igmenu_showMenu(menuId, null,(contextXpos) + "px", (contextYpos) + "px"); //Firefox (W3C) - cancel event if(typeof(e.preventDefault)=="function")e.preventDefault(); //InternetExplorer (Proprietary) - cancel event e.returnValue=false; return false; }
Any, and I mean any suggestions would be greatly appreciated.
Sorry, it seems to do it regardless of the webpanel. I was mistaken.
I have a work around, I just pass the x,y coordinates and make sure I set it to fit within the control. Unless something was fixed in the websplitter/webmenu in version 8.2 that pertained to this problem it probably has something to do with our complex architecture and might not be possible for you to reproduce. In a nutshell, we have 2 web splitters, and outer splitter that is horizontal. Inside its top pane, is another splitter that is verticle. In the left pane of the inner splitter is a WebListBar and the right pane gets dynamic user controls swapped in and out depending on where they've selected in the weblistbar. Thinking about it, maybe its because of the websplitter in websplitter? The inner splitter/right pane is where the webmenu originates. It ends/disappears when the outer most splitter top pane ends.
Does this make sense?
I think I can help you reproduce the problem. It would be hard to give you the code, its a rather complex form that behaves like outlook. So it has to dynamically swap controls on the main page. However, I don't think any of that matters.
I noticed today, that at certain times, the WebMenu does indeed go over top of the lower pane as you'd expect. I discovered that it has something to do with the fact that I have a hidden webpanel. So, here is what the top websplitter pan consists of. The upper portion is a WebGrid and underneath that is a WebPanel with some misc. controls. Programmatically I have to hide the webpanel portion. It is when the webpanel is hidden, that the popup menu seems to disappear with it when the splitter pane ends. If the webpanel is showing, then the WebMenu will extend over top of both panes.
Let me know if that makes sense?
PS. We are still using Infragistics NetAdvantage 8.1
Hello,
I am trying to reproduce the problem, unfortunately to no avail. I use NetAdvantage 2008 v8.2 and menu displays properly at IE7 and Firefox 2.0.
...
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<input id="Button3" type="button" onclick="ShowMenu();" value="button" />
<ignav:UltraWebMenu ID="UltraWebMenu1" WebMenuTarget="PopupMenu" runat="server" JavaScriptFilename=""
JavaScriptFileNameCommon="" LeafItemImageUrl="" ParentItemImageUrl="" StyleSetName="">
<Items>
<ignav:Item Text="Top Item">
</ignav:Item>
</Items>
<Levels>
<ignav:Level Index="0" />
</Levels>
<ExpandEffects ShadowColor="LightGray"></ExpandEffects>
<MenuClientSideEvents></MenuClientSideEvents>
</ignav:UltraWebMenu>
<cc1:WebSplitter ID="WebSplitter1" runat="server" Height="200px" Width="300px" Orientation="Horizontal">
<Panes>
<cc1:SplitterPane runat="server">
<Template>
<input id="Button1" type="button" onclick="ShowMenu();" value="button1" />
</Template>
</cc1:SplitterPane>
<input id="Button2" type="button" onclick="ShowMenu();" value="button2" />
</Panes>
</cc1:WebSplitter>
</div>
<script language="javascript" type="text/javascript">
function ShowMenu() {
igmenu_showMenu("<%=UltraWebMenu1.ClientID %>");
return true;
}
</script>
Could you please send a little bit more information on the problem - this will surely provide additional clues.