RadContextMenu not working in SharePoint 2013 Application Page

2 posts, 0 answers
  1. Dan Harvey
    Dan Harvey avatar
    67 posts
    Member since:
    Jul 2008

    Posted 18 Jul 2013 Link to this post

    Hello,

    I have a SharePoint 2013 application page with a RadContext menu in it.  I am trying to use it as a drop down and it is not working.  Here is my code.  Why isn't it working?
    <asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
     
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
     
        <script type ="text/javascript">
     
            function showMenu(e) {
                var test = id;
                var contextMenu = $("#ctl00_PlaceHolderMain_ctxMenuDocument");
                  $telerik.cancelRawEvent(e);
                  if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget))) {
                      contextMenu.show(e);
                  }
              }
             
        </script>
     
    </asp:Content>
     
    <asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
                 
        <asp:Button runat="server" Text="Test" OnClientClick="showMenu(event)" />
     
        <telerik:RadContextMenu ID="RadContextMenu1" runat="server" >
            <Items>
                    <telerik:RadMenuItem Text="Trees" />
                    <telerik:RadMenuItem Text="Sunset" />
                    <telerik:RadMenuItem Text="Mountains" />
            </Items>
        </telerik:RadContextMenu>
     
    </asp:Content>
  2. Dan Harvey
    Dan Harvey avatar
    67 posts
    Member since:
    Jul 2008

    Posted 18 Jul 2013 Link to this post

    It works.  Must use $find('<%= RadContextMenu1.ClientID %>')
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top