RadContextMenu and ExpandDirection="Up"

2 posts, 0 answers
  1. Pawel
    Pawel avatar
    8 posts
    Member since:
    Sep 2009

    Posted 15 Feb 2010 Link to this post

    I'm trying to display a context menu that expands upwards from the div element. First time I click the div, everything works fine. If i click only inside the div, the menu and the animation work as expected. The problem starts when I click outside the div when the menu is expanded. The animation seems to break and the next time I click the div, the menu does not start expanding from the top edge of the div but appears below it and slides upwards.


    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
    <form id="form1" runat="server"
    <asp:scriptmanager id="Sc1" runat="server"
    <div id="divToClick" style="border: solid thin red; width: 50px; height: 25px; position: absolute; 
        top: 300px; left: 100px;" onclick="ShowMenu(event);"
    <telerik:RadContextMenu ID="RadContextMenu1" runat="server" DefaultGroupSettings-ExpandDirection="Up"
            <telerik:RadMenuItem Text="Item1" Value="vItem1"
            <telerik:RadMenuItem Text="Item2" Value="vItem2"
            <telerik:RadMenuItem Text="Item2" Value="vItem3"
    <script type="text/javascript"
        function ShowMenu(e) 
            var contextMenu = $find('RadContextMenu1'); 
            var divToClick = $get('divToClick'); 
            var bounds = Sys.UI.DomElement.getBounds(divToClick); 
            var x = parseInt(bounds.x); 
            var y = parseInt(bounds.y - 75); 
            contextMenu.showAt(x, y); 

  2. Yana
    Yana avatar
    4850 posts

    Posted 18 Feb 2010 Link to this post

    Hello Pawel,

    I've logged this issue and hopefully it will be fixed. Thank you for reporting it.

    All the best,
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
Back to Top