This is a migrated thread and some comments may be shown as answers.

ContextMenu dont display over the node

4 Answers 79 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Hector Hernandez
Top achievements
Rank 2
Hector Hernandez asked on 19 May 2015, 09:07 PM

Hello, people 
i hve this issue, when rigth-click over the node, then Menu display far away, here an image, hope you can help me.

 


4 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 21 May 2015, 03:53 PM
Hello,

I would ask you to provide more information on the specifics of your scenario, which would help us determine the possible cause for the context menu's positioning.

Do you apply custom CSS to your page? If you do could you please post it so we can check if any of the rules affects the context menu's position.

It would be helpful if you could post the content of your .aspx file or the part of it where the RadContextMenu and the RadTreeView are declared.

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Hector Hernandez
Top achievements
Rank 2
answered on 22 May 2015, 03:25 PM

Hello, thank for you reply.

no, iam not using any css style.

here is the aspx, thanks in advance.

 

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
    <ContentTemplate>
       <telerik:RadTreeView runat="server" ID="TrStd" Skin="Silk">
        <ContextMenus>
            <telerik:RadTreeViewContextMenu ID="MenuNuevo" runat="server">
                <Items>
                    <telerik:RadMenuItem Value="Nuevo" Text="7728#Nuevo Template" ImageUrl="../imagenes/24x24/new.png"></telerik:RadMenuItem>
                </Items>
                <CollapseAnimation Type="none"></CollapseAnimation>
            </telerik:RadTreeViewContextMenu>
            <telerik:RadTreeViewContextMenu ID="Editar" runat="server">
                <Items>
                    <telerik:RadMenuItem Value="Editar" Text="Editar" ImageUrl="../imagenes/24x24/edit.png"></telerik:RadMenuItem>
                </Items>
                <CollapseAnimation Type="none"></CollapseAnimation>
            </telerik:RadTreeViewContextMenu>
        </ContextMenus>
       </telerik:RadTreeView>
       <dx:ASPxPopupControl ID="mipop2" runat="server" AllowDragging="True" 
            AllowResize="True" ClientInstanceName="mipop2" 
            FooterText="1411#Puede ajustar el tamaño de esta ventana" 
            HeaderText="7728#Nuevo Template" Height="430px" Modal="True" 
            PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                Theme="SoftOrange" Width="780px">
            <%--<ClientSideEvents CloseButtonClick=" function(s, e) {window.location.reload(false);}" />--%>
            <contentstyle>
                <paddings padding="0px" />
            </contentstyle>
            <contentcollection>
                <dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" 
                    SupportsDisabledAttribute="True">
                    <br />
                </dx:PopupControlContentControl>
            </contentcollection>
        </dx:ASPxPopupControl>
    </ContentTemplate>
</asp:UpdatePanel>

0
Accepted
Ivan Danchev
Telerik team
answered on 26 May 2015, 12:56 PM
Hello,

I commented out "dx:ASPxPopupControl" and tested the RadTreeView adding several Nodes to it in the markup:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
    <ContentTemplate>
        <telerik:RadTreeView runat="server" ID="TrStd">
            <ContextMenus>
                <telerik:RadTreeViewContextMenu ID="MenuNuevo" runat="server">
                    <Items>
                        <telerik:RadMenuItem Value="Nuevo" Text="7728#Nuevo Template" ImageUrl="../imagenes/24x24/new.png"></telerik:RadMenuItem>
                    </Items>
                    <CollapseAnimation Type="none"></CollapseAnimation>
                </telerik:RadTreeViewContextMenu>
                <telerik:RadTreeViewContextMenu ID="Editar" runat="server">
                    <Items>
                        <telerik:RadMenuItem Value="Editar" Text="Editar" ImageUrl="../imagenes/24x24/edit.png"></telerik:RadMenuItem>
                    </Items>
                    <CollapseAnimation Type="none"></CollapseAnimation>
                </telerik:RadTreeViewContextMenu>
            </ContextMenus>
            <Nodes>
                <telerik:RadTreeNode Text="RootNode1">
                    <Nodes>
                        <telerik:RadTreeNode Text="ChildNode1"></telerik:RadTreeNode>
                        <telerik:RadTreeNode Text="ChildNode2"></telerik:RadTreeNode>
                    </Nodes>
                </telerik:RadTreeNode>
                <telerik:RadTreeNode Text="RootNode2">
                    <Nodes>
                        <telerik:RadTreeNode Text="ChildNode2.1"></telerik:RadTreeNode>
                        <telerik:RadTreeNode Text="ChildNode2.2"></telerik:RadTreeNode>
                    </Nodes>
                </telerik:RadTreeNode>
            </Nodes>
        </telerik:RadTreeView>
    </ContentTemplate>
</asp:UpdatePanel>

The context menu's position was correct as you can see in this screenshot, which makes me believe custom code in your project could be affecting its position.

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Hector Hernandez
Top achievements
Rank 2
answered on 26 May 2015, 06:08 PM

Thanks for the help.

the problem was in on style 

 

Tags
TreeView
Asked by
Hector Hernandez
Top achievements
Rank 2
Answers by
Ivan Danchev
Telerik team
Hector Hernandez
Top achievements
Rank 2
Share this question
or