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

RadContextMenu not working in SharePoint 2013 Application Page

1 Answer 8 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Dan Harvey
Top achievements
Rank 2
Dan Harvey asked on 18 Jul 2013, 02:25 PM
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>

1 Answer, 1 is accepted

Sort by
0
Dan Harvey
Top achievements
Rank 2
answered on 18 Jul 2013, 02:39 PM
It works.  Must use $find('<%= RadContextMenu1.ClientID %>')
Tags
Menu
Asked by
Dan Harvey
Top achievements
Rank 2
Answers by
Dan Harvey
Top achievements
Rank 2
Share this question
or