I’ve got a similar Problem (as to what's posted here).
I’ve a WebDataTree that is higher then the browser window (the browser shows scrollbars.) I’m opening a popup menu when a node is right-clicked. When ever I click a node that is below the initial window (the tree is scrolled down) the popup menu is shown and the whole page is scrolled up. With the result that the popup menu is outside (below) the window.
function Node_Click(tree, eventArgs) {
lastNode = eventArgs.getNode();
var menu = $find("<%= WdmPopup.ClientID %>");
...
menu.showAt(null, null, eventArgs.get_browserEvent());
alert("test" + document.body.scrollHeight);
// here the position is still OK
}
I’m using Version 9.1, the page is using a master page and beside the “node click” I don’t use other client events. I have no clue “when” this is happening or why or how I could use the suggested solution. Any ideas?
The markup of the tree:
<ig:WebDataTree ID="WdtDiagrams" runat="server" DataSourceID="WebHierarchicalDataSourceFolders"
DataMember="DefaultView" EnableConnectorLines="True" InitialExpandDepth="1" StyleSetName="Default"
OnDataBound="WdtDiagrams_DataBound">
<DataLoadingTemplate>
Loading...
</DataLoadingTemplate>
<NoNodesTemplate>
Keine Diagramme gefunden
</NoNodesTemplate>
<ClientEvents NodeClick="Node_Click" />
<DataBindings>
<ig:DataTreeNodeBinding DataMember="OdsTotalTree_DefaultView" TextField="Name" ImageUrlField="ItemImage"
NavigateUrlFields="LinkText" ToolTipField="ToolTip" KeyField="DiagramId" ValueField="KeyId" />
</DataBindings>
</ig:WebDataTree>
Hello uli,
We were able to reproduce the issue.Please contact our support department so they can file a customer issue.Regards
Radko
Thank you Radko!
I opened a case at the support department. As a workaround I tried a solution with the "old" webmenu. My problem now is that with the WebDataTree I get the browser context menu and it seem that I don't have a chance to get it fixed with an oncontextmenu= "return false;". How do I controll the browser context menu in an webdatatree?
Uli
Here is my solution for the problem how to disable and the context menu:
DefaultContextHandler = document.oncontextmenu;
var f = function() { return false; };
document.oncontextmenu = f;
igmenu_showMenu(
window.setTimeout(EnableContextMenu, 400);
function EnableContextMenu() {
document.oncontextmenu = DefaultContextHandler;
Hi Uli,
I really cannot think of any workaround for this issue.
In fact the two controls (WebDataTree and WebDataMenu) are causing the page to scroll to the top, so the issue have to be fixed in the two of them. I already found a solution for the tree and I think it can be used in the context menu as well, however the fixes will be available in the next service releases.
Regards